I want to put the following string: '10-10-2013 03:04' in a Date object. It's working in Chrome but Firefox tells me it's an invalid Date. (I guess they mean format?) I tried to use Date.parse on it but that makes it a NaN.
What to do?
UPDATE: I used the answer of thefourtheye, but now Chrome actually says it's an invalid date ..
var dateString = '10-10-2013 03:04';
dateString = dateString.replace(/-/g, ' ');
var DateToUse = new Date(dateString);
Returns an invalid date in Chrome.