I have a select menu with options looking something like this...
<option value="2013, 2, 1">01/03/2013</option>
I want to create an array of the dates from this menu but as milliseconds
so I need something like:
myArray = [1368140400000,... etc]
Any ideas how I can get this? I've tried this so far but it doesn't work, returning NaN instead.
var startDates = new Array;
$("select.startdates").find("option").each( function() {
startDates.push(new Date($(this).val()).getTime())
});