Two Jquery Datepicker With Two date columns - Filter not working

Two Jquery Datepicker With Two date columns - Filter not working

HeveenHeveen Posts: 5Questions: 4Answers: 0

Hello Guys

I have a datatable with two date columns (from - To)
And two date pickers (min and max)

The two date pickers should provide me a range of dates which I use to filter the From and To dates columns
I have searched online but unfortunately could find example where two date pickers filter two date columns.

So, my objective is to be able to filter the two date columns using the two date pickers selecting a start date from the min datepicker and To date from the max date picker..

please have a look at my code
http://live.datatables.net/upgrade/162/edit?html,css,js,output

When I select a start date from the min date picker, no matching records found. Same for the end Date.
I have tried my very hard, but unfortunately, nothing happened.

Can you guys please help me out.
Thanks

This question has an accepted answers - jump to answer

Answers

  • HeveenHeveen Posts: 5Questions: 4Answers: 0

    I have updated the codes

    Some selection are made, but still no right from and To selecttion

    http://live.datatables.net/upgrade/162/edit

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Hi @Heveen ,

    If you add debug in, like here, you'll see invalid date being returned if you leave min null and max to a date in the middle of July. I'm not familiar with those controls, but that's the path to go down.

    Cheers,

    Colin

  • cpshartcpshart Posts: 246Questions: 49Answers: 5

    Hi Heveen

    I am trying to do something similar, one issue in your code, you were using http instead of https in this line of code

            <script type="text/javascript" language="javascript" charset="utf-8" src="http://code.jquery.com/jquery-3.3.1.min.js"></script>
    
    

    Did you get a resolution to your problem, as I would be interested in hearing it, thanks

    Colin

  • cpshartcpshart Posts: 246Questions: 49Answers: 5
    Answer ✓

    Here is a working example of the bootstrap datepicker used as a datatables date filter, hope it helps

    https://jsfiddle.net/bindrid/2bkbx2y3/6/

    Colin

This discussion has been closed.