title: jQuery-validating start time and end time selected using time picker
body: <p>I want to validate start time and end time selected using <strong>timepicker</strong> which is in 12 hr format. The end time should be greater than the start time. I used an <code>if</code> statement but when the test is using values such as 8:00 AM as start time and 1:00 PM as end time, it is not working. What can I do to solve this problem. Someone please help me with this. I am stuck with this since yesterday. I want just <strong>time</strong> ,i <strong>don't need date</strong>.</p>
  
  <pre><code>$("#dateTimeAddButton").click(function () 
  {       
      var Date=$('#myDatePickerId').val()
      var startTime = $('#i').val();   
      var endTime   = $('#i1').val();    
      if (startTime &gt; endTime) 
      {
          alert('End time always greater then start time.');
      }
  });
  </code></pre>