I have to compare two timing one is start time and second is end time of a selected date that the start time always less than the end time.
And i have tried this but it doesn't worked.
startTime="12:00 AM";
endTime ="01:15 PM";
if(Date.parse('01/01/2011 '+endTime) < Date.parse('01/01/2011 '+startTime))
{
alert("End time should exceed the start time");
}
else if(Date.parse('01/01/2011 '+endTime) -Date.parse('01/01/2011 '+startTime)==0)
{
alert("Start time and end time cannot be same");
}