I have a column start_date
in my database which is of type date
, now i am trying to pass this data into my javascript function but it returns other data. I tried this: Send PHP date to JavaScript date format
but it doesn't work on my case. My data looks like 2019-11-21
and my function gives me this Thu Jan 01 1987 03:00:00 GMT+1000
which is very far from my actual data. This is my javascript function:
function manageActionType(action, start_date){
console.log(new Date(Date.parse(start_date)));
}