I receive this value (2018-12-19T14:07:03.068+0000) from a service of BE, try to transform in date
new Date('2018-12-19T14:07:03.068+0000')
This works in Chrome, but IE outputs "Invalid Date"
I receive this value (2018-12-19T14:07:03.068+0000) from a service of BE, try to transform in date
new Date('2018-12-19T14:07:03.068+0000')
This works in Chrome, but IE outputs "Invalid Date"
It fails because it is not a valid date time string. The best option would be to fix it in the backend. If you can't do that, fix it in the frontend. For example as follows:
var invalidDate = '2018-12-19T14:07:03.068+0000';
var validDate = invalidDate.substring(0, 26) + ':' + invalidDate.substring(26);
console.log(validDate, new Date(validDate));