Search code examples
javascriptdatetimefilterdatatables

How do I filter date range in DataTables?


I have a large dataTable which contains ride information. Every row has a start datetime and an end datetime of the following format(yyyy-mm-dd HH:mm:ss). How can I use a datepicker for setting a filter range in dataTables? I want to have a datepicker which only selects a day and not the time. I've searched everywhere for the proper answer but I couldn't find it.

For example I want to see all rows of July by selecting (01-07-2016 - 31-07-2016).


Solution

  • Here is DataTable with Single DatePicker as "from" Date Filter

    LiveDemo

    Here is DataTable with Two DatePickers for DateRange (To and From) Filter

    LiveDemo