Datatable filtered with datepicker doesn't refresh

Datatable filtered with datepicker doesn't refresh

giulgiugiulgiu Posts: 4Questions: 3Answers: 0

Hi,
I would like to create a Datatable with a datepicker to filter the data.
I've tried but I have a problem, when I select the date in the datepicker, the Datatable doesn't refresh and doesn't show the right rows.
It only works if I select a date in the datepicker and then I click the arrows in the Datatables(the ones that order the data) or if I press multiple times Enter.

This is the code I have written: https://jsfiddle.net/c9q5b0k3/3/

I hope someone can help me, thanks in advance!

Answers

  • colincolin Posts: 15,166Questions: 1Answers: 2,588

    Hi @giulgiu ,

    if you change your listener to be:

      $('#date').on('keyup change', function() {
        table.draw();
      });
    

    everything appears to work well. See here.

    Cheers,

    Colin

This discussion has been closed.