title: Disabling times in a timepicker on current day doesn't work properly
body: <pre><code>&lt;body&gt;
      &lt;p id="datepairExample"&gt;
          &lt;input type="text" id="date" class="date start" /&gt; &lt;input id="time"
          type="text" class="time start" /&gt;
      &lt;/p&gt;
  &lt;/body&gt;
  &lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/datepair.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/bootstrap-datepicker.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.datepair.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/jquery.timepicker.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/site.js"&gt;&lt;/script&gt;
  
  
  &lt;script&gt;
      $(document).ready(function() {
          $('#datepairExample .time').timepicker({
          'showDuration' : true,
          'timeFormat' : 'g:ia'
      });
  
      $('#datepairExample .date').datepicker({
          startDate : "0d"
      });
      $('#datepairExample .date').datepicker().on('changeDate', function(ev) {
          var x = new Date();
          var s = document.getElementById("date").value + "";
          if (s.charAt(0) == '0') {
              s = s.substring(1, s.length);
          }
  
          if (x.toLocaleDateString() == s) {
              alert("abc");
              $('#datepairExample .time').timepicker({
                  'disableTimeRanges' : [ [ '12am', x ] ]
              });
          }
          /* else{
              alert("pqr");
              $('#datepairExample .time').timepicker({
                  'showDuration' : true,
                  'timeFormat' : 'g:ia'
              });
  
          } */
      });
  
      //$("#datepairExample .date").datepicker("option", "startDate", -1);
      /*$(function() {
          $("#datepairExample .date").datepicker({
              numberOfMonths : 3,
              showButtonPanel : true,
              minDate : x
          });
      }); */
  
      // initialize datepair
      $('#datepairExample').datepair();
  
      });
    // initialize input widgets first
    &lt;/script&gt;
  </code></pre>
  
  <p>Disabling time works fine, if only the current day is selected first in the date picker and doesn't work if the current day is selected after any date.</p>
  
  <p>So basically, the times are being disabled only if they are the first things to be selected, and the dates will not be enabled after being disabled even if the date selected is not the current date.</p>
  
  <p>I've used 'alert' statements in order to check if the blocks are being executed or not by selecting the dates again, they are getting executed, but no change in the output. Thanks in advance for anyone who is going to help me in this. </p>