In the DataTables date range filter example how do you clear the filter?
In the DataTables date range filter example how do you clear the filter?
LBig
Posts: 3Questions: 1Answers: 0
I am looking at the DataTables date range filter example and am able to filter for a date range but I cannot work out how to clear the filter after it has been applied.
This question has an accepted answers - jump to answer
Answers
Can you link to the example in question please? The DataTables core example that does a custom range search is this one which is numeric, rather than date range.
In the case of the example I linked to, you would use DOM or jQuery methods to empty the two inputs and then trigger an
input
event on one of them.Allan
Thank you for your response. The example is this one: https://datatables.net/extensions/datetime/examples/integration/datatables.html
One option is to add buttons to clear the datetime inputs then trigger the
change
events. Something like this:https://live.datatables.net/qowivera/1/edit
Took the example you linked to and added two buttons and click events for each button.
Kevin
Thanks so much for your help. This is exactly what I was looking for.