Possible Duplicate:
How can I convert string to datetime with format specification in JavaScript?
I have the code given below for validating the start time and end time.
It works to some extend but when I give start time 9:00 AM and End time 1:00 PM it does not work.
$("#dateTimeAddButton").click(function ()
{
var Date = $("#myDatePickerId").val();
var startTime = $("#start-Time").val();
var endTime = $("#end-Time").val();
if(startTime > endTime)
alert('end time always greater then start time');
});
Someone help me with this.Thanks in advance