I am trying to convert date in to local time using below syntax new Date("2020-10-20 GMT+0530")
Its working in chrome but not in IE
In IE , it returning as invalid date
How to fix this in IE? Need your suggestions
I am trying to convert date in to local time using below syntax new Date("2020-10-20 GMT+0530")
Its working in chrome but not in IE
In IE , it returning as invalid date
How to fix this in IE? Need your suggestions
IE does not support that format.
You need to supply the date string in ISO format:
new Date('2020-10-20T00:00:00-04:00')
Or like this:
new Date(year, month, day, hours, minutes, seconds, milliseconds)
Like the person above said, not all browsers support all methods. For older browsers you need to input it in an ISO format. You cannot fix IE, unless you want to make yourself a modified version of it.