Why isn't the datatables filter() method not filtering out date ranges?
Why isn't the datatables filter() method not filtering out date ranges?

Good night, I want to create a date range filter using the datatables filter function. But it isn't affecting or changing the table.
I tried using $.fn.dataTable.ext.search but that did not work for me.
Here is a link to my code: http://live.datatables.net/fahofoho/3/edit.
Please let me know where I am going wrong.
Thank you.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Your example is using
filter()
which does not filter the table but provides a result set that can be used in Javascript. From thefilter()
docs:Do you have an example we can look at?
Bindrid has an example date range search plugin in this [thread]. See if it helps.
Kevin
Thank you for replying but there isn't a link to Bindrid's thread.
Hi @dt_user ,
This example here shows an age range - you could use that as a template. You could then use Moment.js to do the comparisons.
Cheers,
Colin
Sorry, here you go:
https://datatables.net/forums/discussion/39894/date-range-filter#latest
Must be the weekend :-)
I'm guessing Colin meant this example.
Kevin
Thanks Kevin, must be the weekend
Thank you both.