title: using Daterange after displaying html table from CSV file
body: <p>I'm trying to filter date range using jQuery UI, it works on static  HTML table, but I'm displaying my table from my CSV file.</p>
  <p>So first I import the CSV data in my JavaScript code then I write some html content using JavaScript (with innerhtml).</p>
  <p>My problem is: filtering my data using datepicker() in jQuery doesn't work correctly, this is the code I'm using:</p>
  <pre><code>/* Custom filtering function which will search data in column four between two values */
  
  $(document).ready(function () {
     $.fn.dataTable.ext.search.push(
        function (settings, data, dataIndex) {
           var min = $('#min').datepicker(&quot;getDate&quot;);
           var max = $('#max').datepicker(&quot;getDate&quot;);
           var startDate = new Date(data[4])
           if (min == null &amp;&amp; max == null) {
              return true;
           }
           if (min == null &amp;&amp; startDate &lt;= max) {
              return true;
           }
           if (max == null &amp;&amp; startDate &gt;= min) {
              return true;
           }
           if (startDate &lt;= max &amp;&amp; startDate &gt;= min) {
              return true;
           }
           return false;
        }
     );
  
  
     $(&quot;#min&quot;).datepicker({
        onSelect: function () {
           table.draw();
        },
        changeMonth: true,
        changeYear: true,
        dateFormat: &quot;dd/mm/yy&quot;
     });
     $(&quot;#max&quot;).datepicker({
        onSelect: function () {
           table.draw();
        },
        changeMonth: true,
        changeYear: true,
        dateFormat: &quot;dd/mm/yy&quot;
     });
     var table = $('#example').DataTable();
  
     // Event listener to the two range filtering inputs to redraw on input
     $('#min, #max').change(function () {
        table.draw();
     });
  });
  </code></pre>
  <p>When I try to filter my data (4th column of my table) using datepicker, I got strange result: it display few rows after writing a date in the start-date input, and displays nothing when I write date in final-date input.</p>
  <p>I heard like datepicker() is loaded only when the document is loaded but my JS code is supposed to write all my CSV data in a table.</p>