Adding date range search

Adding date range search

linksdesignlinksdesign Posts: 11Questions: 5Answers: 0

I'm using DataTables to facilitate searching on a database-driven table on a client's site. There's a test case here: http://live.datatables.net/buluseni/7/edit

I already have a few modifications to the code to add individual column searching, export functions etc but the client now wants to add a date range search as well. There are two separate date fields ('Completion Date' and 'Date Paid') and I'd like to add "From" and "To" search boxes for both of these, similar to the example here: http://next.plnkr.co/edit/mdeEYoZtnvpfHCdtSxDP?p=preview&preview

Could some kind person help me to add the required code to my existing Javascript? I've added the HTML for the input boxes and have tried quite a few times with the Javascript but keep getting code errors - unfortunately I'm not great with Javascript and tend to suffer from code blindness! :blush:

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    This example here is doing a range search on age - you could use that as a guide.

    Colin

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    This thread may help you add the date range filter.

    Kevin

This discussion has been closed.