Opened 14 years ago

Closed 14 years ago

#4116 closed bug (wontfix)

$('#my_datepicker').datepicker("minDate", new Date()) is throwing an error

Reported by: jimmy Owned by:
Priority: major Milestone: 1.7
Component: ui.datepicker Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:


Here is my example:

var dateFromObj = $('#booking_from_datepicker').datepicker("getDate");

// this works fine
$('#booking_to_datepicker').datepicker("setDate", new Date(dateFromObj.getTime()+172800000));

// this line fails
$('#booking_to_datepicker').datepicker("minDate", new Date(dateFromObj.getTime()+172800000));

I get the following error:

Error: $.datepicker["_" + options + "Datepicker"] is undefined
Source File:
Line: 1611

Change History (1)

comment:1 Changed 14 years ago by kbwood

Resolution: wontfix
Status: newclosed

To set the minDate (and other settings) use:

$('#booking_to_datepicker').datepicker("option", {minDate: new Date(dateFromObj.getTime()+172800000)});

Note: See TracTickets for help on using tickets.