title: How to set end date greater the start date using jquery date time picker
body: <p>Am using jquery date time picker set an event's start and end dates.But how can I prevent to select event end date should greater than event start date. I end date selected first then start date should be less than end date.</p>
  
  <p>I have tried using the following code,but didn't worked for me:</p>
  
  <pre><code>    $('#startDate').datetimepicker({
          dayOfWeekStart : 1,
          lang:'en',
          minDate: new Date(),
          onSelect: function(dateText, inst){ 
            $("#endDate").datetimepicker('option', 'minDate', dateText);
         }  
      });
  
      $('#endDate').datetimepicker({
          dayOfWeekStart : 1,
          lang:'en',
          startDate:  new Date(),
          onSelect: function(dateText, inst){
            $("#startDate").datetimepicker('option', 'maxDate', dateText);
         }
      });
  </code></pre>
  
  <p>And my html for the page is like:</p>
  
  <pre><code>   &lt;form action="" method="POST"&gt;
      &lt;div class="col-sm-2 col-lg-2"&gt;
          &lt;div class="form-group "&gt; 
              &lt;input type="text" value="" id="startDate" name="startDate" class="form-control" autocomplete="off" placeholder="Start Date"/&gt;
  
          &lt;/div&gt;
          &lt;div class="form-group "&gt; 
              &lt;input type="text" value="" autocomplete="off" id="endDate" name="endDate" class="form-control" placeholder="End Date"/&gt;
  
          &lt;/div&gt;
          &lt;div class="form-group "&gt; 
              &lt;input type="text" value="" name="eventName" class="form-control" placeholder="Event Name"/&gt;
  
          &lt;/div&gt;
              &lt;input type="submit" name="submit" value="Add Event" class="btn btn-primary"&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>