title: Datetime picker validation start date should be less than end date not working
body: <blockquote>
    <p><strong>Jquery Date time picker</strong> <strong>validation</strong> start date should be less than end date, and my current code is not working</p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
    $("#startdate").datetimepicker({
      format:'Y-m-d H:i:s',
      onSelect: function (selected) {
        var dt = new Date(selected);
        dt.setDate(dt.getDate() + 1);
   $("#enddate").datetimepicker("option", "minDate", dt);
  }                                 
  });
    $("#enddate").datetimepicker({
      format:'Y-m-d H:i:s',
      onSelect: function (selected) {
        var dt1 = new Date(selected);
        dt1.setDate(dt1.getDate() - 1);
        $("#startdate").datetimepicker("option", "maxDate", dt1);
      }
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;label &gt;Starts ON&lt;/label&gt;
  &lt;input id="startdate" type="text" placeholder="YYYY-MM-DD HH:MM:SS" class="linecons-calendar"/&gt;
  &lt;label&gt;Ends ON&lt;/label&gt;
  &lt;input id="enddate" type="text" placeholder="YYYY-MM-DD HH:MM:SS" class="linecons-calendar"/&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <blockquote>
    <p>I am not able to validate onselect function is not getting triggered</p>
  </blockquote>