vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
731 stars 285 forks source link

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

Closed snex closed 4 years ago

snex commented 4 years ago

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 commented 4 years ago

@snex Hi, please try this yadcf version

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

snex commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

I guess in a day or two a new beta will be out (it will be available on npm)

On Wed, Nov 20, 2019 at 10:46 PM Dave Havlicek notifications@github.com wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vedmack/yadcf/issues/603?email_source=notifications&email_token=AAM2EX6ZDG4QFSIEM6E2JHDQUWOZTA5CNFSM4JNZOQM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEUZGTI#issuecomment-556372813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM2EX2L4MV7ULCRECOWSHLQUWOZTANCNFSM4JNZOQMQ .