Skip to content
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

Date range with jquery-ui datepicker disables "future" dates even after they have been cleared #603

Closed
snex opened this issue Nov 15, 2019 · 7 comments

Comments

@snex
Copy link

snex commented Nov 15, 2019

Page showing issue: https://poker.xens.org/hand_histories

When you use the date range filter on the above page, select a date in the past for the "To" date (e.g. August 1 2019). The "From" date correctly disallows selecting a date before this date. However, even after the filter is cleared out, the "From" date is being constrained by the previously chosen date.

@vedmack
Copy link
Owner

vedmack commented Nov 17, 2019

@snex Hi, please try this yadcf version

if it won't work then provide me with a test page I can check myself

@snex
Copy link
Author

snex commented Nov 17, 2019

The problem still persists, however now it seems to be preventing any date after the 1st of the month of the original chosen date (e.g, you selected Nov 17, then cleared the filters, it now disables Nov 1st and beyond). Unfortunately I am unable to push this to a live production site, but you should be able to reproduce the issue by following the steps provided.

@vedmack
Copy link
Owner

vedmack commented Nov 17, 2019

@snex try setting up a jsfillde page with minimal code that reproduces the issue and when it up post it here...
or just edit / debug yadcf code,
bottom of the method function rangeClear , inside the else if (columnObj.datepicker_type === 'jquery-ui') { clause , you can modify it and see what works for you the best

@snex
Copy link
Author

snex commented Nov 18, 2019

https://jsfiddle.net/x1k0f5s4/

Set the "To" date to 2019-09-01.

Notice the table data are correctly both filtered out.

Clear the filter.

The records correctly come back.

Click the "From" field.

Dates after 2019-09-01 are disabled.

@vedmack
Copy link
Owner

vedmack commented Nov 20, 2019

@snex try the following jsfiddle https://jsfiddle.net/t36emc8q/3/

It uses 0.9.4.beta.33 (u can grab it from the test page)

@snex
Copy link
Author

snex commented Nov 20, 2019

This appears to fix it. Do you know when an official release will happen? I am using yarn/webpacker so having hacked files sitting around is probably not a good idea overall. Thanks.

@vedmack
Copy link
Owner

vedmack commented Nov 20, 2019 via email

vedmack added a commit that referenced this issue Nov 21, 2019
enhancement:

#603 - Date range with jquery-ui datepicker disables "future" dates even after they have been cleared
@vedmack vedmack closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants