The page works fine in Chrome, but this is a minor mistake in FF and there is a separate problem in IE. Assistance with any of these issues is greatly appreciated. Since FF has been stumped for the longest in error, I will start with one of the following:
Here is the code:
The date picker selects the date using the format "07-08 -2010 23:28". Now, I have to go through this time as a parameter for my servlet, which is expecting the time shown as a long time, it is no problem in chrome Date object accepts a string in the format given above , But when I try to get GetTime () on a date with the string in FF immediately, then it gives NaN. So what I have linked to the page, everything I have done on it is handling a little bit so that the user should be asked to re-enter the dates so that he can be read as an NN. This is not clearly a banded solution, even if you enter the date again, still it must still read the NAn. I have to know that why does not the date function interrupt you to use the string that you see in the input text field in the FF.
In IE, for some reason tell me that sTime is undefined.
Thank you!
try
new date (date string) . GetTime () (Unlike a ugly action ...)
Edit: This will give wrong results.
But as mentioned in the comment, ECMAScript 5 is not a standard date format used by Javascript before standard 5. It is better to parse the date string directly:
m = dateString.match (/ (\ d +) - (\ d +) - (\ d +) (\ d +): ( \ D +) /) date = new date (+ m [3], i [1] -1, + m [2], + m [4], + m [5]); // Note: Jan = 0