datepicker = set a variable to be the mindate

datepicker = set a variable to be the mindate


This may be stupid - but I can't seem to get this to work.
I want to set a variable to be the date in the mindate
This does not work
[code]
var myStartDate = "2009-01-15"
var myStartDate2 = "2009,1-1,15"
$("#doDate").datepicker({
    dateFormat: "yy-mm-dd"
, hideIfNoPrevNext: true
    , minDate: new Date(myStartDate)
, maxDate: "0D" // can't put in date after today
});
nor does this work
$("#doDate").datepicker({
    dateFormat: "yy-mm-dd"
, hideIfNoPrevNext: true
    , minDate: new Date(myStartDate2)
, maxDate: "0D" // can't put in date after today
});
[/code]
thanks