Excellent. Thanks for the pointer! It almost worked.  To make it work
I changed it to

[code]
var myStartDate2 = new Date(2009,1-1,15)
...
, minDate: myStartDate2
[/code]

Thanks for the quick reply - much appreciated.

On Jan 29, 12:37 pm, Stephan Veigl <[email protected]> wrote:
> Your myStartDate2 is close to the solution, but you try to initialize
> a date with a string "2009,1-1,15".
>
> either you write:
>   var myStartDate2 = Date(2009,1-1,15)
>   $("#doDate").datepicker({ ...
>     , minDate: myStartDate2
>   ...});
>
> or
>   $("#doDate").datepicker({ ...
>     , minDate: new Date(2009, 1-1, 15)
>   ...});
>
> by(e)
> Stephan
>
> 2009/1/29 kathb4 <[email protected]>:
>
>
>
> > 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to