I have tried to change this date in yyyy-mm-dd using
function convert(str) {
var date = new Date(str);
var mnth = ("0" + (date.getMonth() + 1)).slice(-2)
var day = ("0" + date.getDate()).slice(-2);
return [date.getFullYear(), mnth, day].join("-");
}
But it's giving me the error Naan in i.e 8. It's working with all other browsers.
Any one can help me in this?
Thanks