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 ''.
test case: https://jsbin.com/cixawez/edit?html,js,output
steps to cause problem:
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 ''.