vedmack / yadcf

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

Date range filter values are not set when scroll X and Y are used #595

Open Daragoza opened 4 years ago

Daragoza commented 4 years ago

When using date_range filters, the value that set in the input is never found when scrollX and scrollY are involved. I say involved because regardless of boolean value assigned to the scroll setting, the date_range will break.

https://jsfiddle.net/sLz38694/2/

In the following fiddle, I have constructed an example that closely follows my scenario. As soon as any individual column search is filled in, the table will fire a call to the fake endpoint. Notice when you set a 'text' value, it is passed along the network, but as soon as a date_range is chosen by the user, it will not be send along.

If you remove the scrollX and scrollY part, you see the date values are being posted.

afbeelding

I took initiative to dive in the source code and I noticed that the input that is triggering the event, does not actually hold the value of the date picker. Instead there is one behind the table (which I assume is because of the scroll X and Y) and one in front.

See here

Input that is used to retrieve the value, but does not have it: afbeelding

Input that actually holds the value: afbeelding

I also noticed that in this issue you fixed something similar by introducing selectorePrefix. Could that be a solution for my above problem as well?

Daragoza commented 4 years ago

I failed to mention that when the table is serverSide = false, the search will work, but the table state and its localstorage will again have empty values for date columns.