IE JavaScript date parsing error

You are getting NaN value in IE 8 and its working in Firefox because the format of the string varies with browser and operating system.

For example, in IE6 for Windows XP, the string is in the following format:

Tue Dec 05 16:47:20 CDT 2006

But in Firefox for Windows XP, the string is

Tue Dec 05 2006 16:47:20 GMT-0500

to make it compatible with both browser you will have to first check the browser in your
javascript code and then accordingly give your input date string.

Leave a Comment