title: Filter dates in table from, to
body: <p>I have table in my project</p>
  
  <p>I have filtering by date in my table</p>
  
  <p>Now it filters only by Date from value, but I want to filter it from-to dates.</p>
  
  <p>How I can do this in my case?</p>
  
  <p>Here is snippet that demonstrates my problem</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $('#datefilterfrom').change(function () {
          var date = moment(this.value).format('DD/MM/YYYY');
          var filter, table, tr, td, i;
          filter = date.toUpperCase();
          table = document.getElementById("testTable");
          tr = table.getElementsByTagName("tr");
          for (i = 0; i &lt; tr.length; i++) {
              td = tr[i].getElementsByTagName("td")[2];
              if (td) {
                  if (td.innerHTML.toUpperCase().indexOf(filter) &gt; -1) {
                      tr[i].style.display = "";
                  } else {
                      tr[i].style.display = "none";
                  }
              }
  
          }
  
      });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"&gt;&lt;/script&gt;
   &lt;div class="row"&gt;
          &lt;div class="col-md-3"&gt;
              &lt;h4&gt;Date from&lt;/h4&gt;
              &lt;input type="date" class="form-control" id="datefilterfrom" data-date-split-input="true"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
              &lt;h4&gt;Date to&lt;/h4&gt;
            &lt;input type="date" class="form-control" id="datefilterto" data-date-split-input="true"&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  &lt;table id="testTable" class="table" border="1"&gt;
    &lt;tr&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;18/07/2018&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;19/07/2018&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
      &lt;td&gt;20/07/2018&lt;/td&gt;
      &lt;td&gt;nothing&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank's for help.</p>