Novice question. I've got a string in the following format:
var dateStr = '2012-4-14';
I want to make it into a JavaScript Date object. The following creates a Date object in Chrome, but is NaN in IE8:
var myDate = new Date(dateStr);
What should I be doing differently - should I split the string?
Thanks!