Date range filters based on yadcf changing default values.
Date range filters based on yadcf changing default values.
![Marcin1](https://secure.gravatar.com/avatar/b63c2aafbd72299b48727a230d6d39c6/?default=https%3A%2F%2Fvanillicon.com%2Fb63c2aafbd72299b48727a230d6d39c6_200.png&rating=g&size=120)
I use dataTable with date range filters based on yadcf. When user change webpage and come back to a webpage with filters there are still old filters values. I have created JS function to reset yadcf filters. Problem is that datatables fires an ajax and then this function is called.
My question is: how to call my function to change default filters values and then fire the ajax?
This discussion has been closed.
Answers
Hi @Marcin1 ,
The only way I can think that previous values are being stored is if
stateSave
is enabled.We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi @Colin,
Yes, you are right! All the states from e.g. pagination, search, filters were stored in a web storage. Wich is depended on
stateSave
attribute. I have set up it tofalse
. Also, I have set up initial filters inDataTables
.All work fine now.
Thank you Guys again!
Marcin1