I am using Javascript Date.parse()
to check if a start time is after an end time.
The time in question is like this:
Date.parse("12:00pm") > Date.parse("9:30pm")
In Chrome this is coming up as false (as it should)
In IE it is incorrectly coming up as true.
The values Chrome see's are:
Thu Jul 22 2010 12:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jul 22 2010 21:30:00 GMT-0400 (Eastern Daylight Time)
The values IE sees are:
Thu Jul 22 12:00:00 EDT 2010
Thu Jul 22 09:30:00 EDT 2010
How can I make IE work correctly?
update
OK this is only happening in IE7. Also I see now IE7 is not getting the am/pm which is stored in a SELECT box and retrieved via:
var startMerid = document.getElementById("start_time_ampm").options[document.getElementById("start_time_ampm").selectedIndex].value;
My select was like this:
<option>am</option>
but I changed to:
<option value="am">am</option>
and it now works.