The date format is not valid, but two different browsers treat it differently (Chrome works with an invalid date, while Firefox causes an error).
To make it valid, you can add a character Tbetween the date and time:
var dateRaw = '2016-03-14T17:37:12';
but I get the date in a specific format. and i can't change it
In this case, you need to add the character Tusing JavaScript:
var dateRaw = '2016-03-14 17:37:12'.replace(' ', 'T');
() T.