Filtering date using Datepicker
Filtering date using Datepicker
motoradk
Posts: 2Questions: 1Answers: 0
Hello Everyone,
I have one problem with my Datatables. I want filter my datatable by date using Datepicker. I know that there is a "date-range" (columnFilter) but I want to single field of Datepicker, not "from" and "to". Any sugestions?
This discussion has been closed.
Answers
If its for column filterting you can use my yadcf and its
filter_type: "date"
option , see third column on the showcase see code snippet at the bottom , yadcf support 'jquery-ui', 'bootstrap-datetimepicker' date pickers read docsYou should be able to format the datePicker into the same format that your column data is in.
To make it the most sortable without having to define the sorttype, that would be "yyyy-mm-dd"
For datepicker, that's a format of "yy-mm-dd". You need to format your date in dataTables in the same manner, it's just a string search.
Please note, I'm assuming you really mean search when you say filter.
Upon select of datePicker, you should be able to fire the dataDatables search method().
yadcf works perfect! Thanks Guys for help, cheers !