Ok I cant get my head round this, ive looked at so many posts on SF but cant figure it out.
I need to compare two dates & times, start and end.
If end is great then alert();
Works in Chrome but not IE(9)
(format is: 01-Jan-2013 10:00)
var stDate = new Date(date +" "+ start);
var enDate = new Date(dateEnd + " "+ end);
if ( Date.parse ( enDate ) > Date.parse ( stDate ) ) {
alert('on no');
}
Please help, im stuck…
Just make a custom parser, it’s done faster than trying to figure how different browsers treat various time string formats:
This returns Unix time in milliseconds, and it use UTC, thus avoiding complications from the missing hour of daylight savings time. It works with the format you specified, but does not validate input.