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

clear filter when using date_custom_func leaves last filtered date supplied to custom_func #644

Open
louking opened this issue Dec 30, 2020 · 0 comments

Comments

@louking
Copy link
Contributor

louking commented Dec 30, 2020

test case: https://jsbin.com/cixawez/edit?html,js,output

steps to cause problem:

  • pick a filter date which limits display
  • click x to filter
  • previous filtered set remains

also ref: https://stackoverflow.com/questions/65460395/yadcf-clear-filter-when-using-date-custom-func-still-causes-last-date-to-be-supp

I have a table with start and finish dates in the rows, and I want to create a date filter which chooses rows for which the date in the filter is between the start and finish dates. The start or finish dates might be empty which means "unspecified" so the range is open on that side of the start/finish span.

I messed around with range date on the two columns but wasn't able to get that to work, and decided the best solution was probably to use the date_custom_func. This works for the most part, but seems like clearing the date in the filter causes the filterVal in the custom_func to be passed the last value of the filter rather than ''.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant