-
Notifications
You must be signed in to change notification settings - Fork 754
Datepicker range selector filters on the day regardless of settings #512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not seeing this issue on my end... maybe just clear out your saved filter searches:
Or, at least in Chrome:
The way the filter formatter works now is that when you hit the reset button, it returns the values back to their default values, not empty strings. For the uiDatepicker, it is set by the |
Hmmm, that didn't work for me as I get values there even without anything in local storage and with from and to not set. I will keep looking on my side now that I know you're not seeing the issue. |
Well, maybe I am not understanding the problem. Do you see the same issue in this demo? It is using the same settings as above. Are you sure you're using the latest filter widget and filter formatter scripts? |
Hi @Mottie, I'm still having the same issue and can't figure out what's wrong with the code. I have a demo at http://remote.frela.info in case you are able to take a look (I use a database so I can't demo at jsfiddle). You can see that it filters upon loading on from and to dates even though I have those set to blank (and the to date is a Unix time stamp with too many zeroes at the end). If you click "Clear Filters" the rows appear. |
Ok, thanks! I finally see the problem, now to find & fix it ;) |
Hi @Mottie, I can sort of recreate the problem at http://mottie.github.io/tablesorter/docs/example-widget-filter-formatter-1.html. First add date filters in the from and to fields in the two-input column. Then refresh the page. You should see a funny unix stamp in the to field. This is what I'm seeing, although for me it happens also when the table first initializes. |
Hi @lindonb! I did spend some time on this problem. I found a solution, but got distracted with modifying the cache to better work with some widgets. I'll include this fix "soon"... look for it when I get v2.16 done. |
Thanks @Mottie! When ajax is used, I think this same issue is causing an ajax call to search on the date fields when the table first initializes even if no defaults have been set. On Mar 31, 2014, at 8:02 AM, Rob G [email protected] wrote:
|
Hey @lindonb! I think I got this bug squashed, but I'd appreciate it if you would make sure :P Thanks! |
Hi @Mottie! The bug is still there for me - see http://remote.frela.info which has been upgraded to 2.16.1. The table first initializes okay but immediately is filtered with a date range of the current day. Seems like the attempt to put placeholders in for today's date is causing the problem. Personally, I would prefer to not have any date placeholders - may be that would help. Couple of minor differences in the way it behaves compared to before:
Thanks for taking a look. |
Needed for older versions of jQuery UI
Hey @lindonb! Try the latest update of the filter-formatter script in the working branch For some reason, the datepicker didn't like the date to be set with an empty string, so I changed then to |
Hi @Mottie - you nailed it! All is well. Thanks so much for the quick work. |
With version 2.15.5 the uiDatepicker always filters on the day regardless of settings. I have the following
filter_formatter
settings:The issue seems to be that the
input.dateRange
element has been set as follows:If I comment out line 751 of
jquery.tablesorter.widgets-filter-formatter
then at least nothing is filtered, but dates still show in the from and to fields (with the to field showing the raw UNIX timestamp). Here is line 751 that I commented out:The text was updated successfully, but these errors were encountered: