Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Internet Explorer gives Invalid Date error in Javascript

$
0
0

Hi ,

I am using Internet Explorer version 11. I have code as below which works fine on Chrome and Firefox but not on IE and gives error saying Invalid Date.

var temp = new Date(r);

here r is the date returned from server, which is in this format "6/1/2016 9:15:12 AM +00:00".

I played with this string and found that, when +00:00 (Time zone) is not there, it works fine. I am not sure why Internet Explorer fail to Identify this as Valid Date.

--DP


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>