Skip to main content

Search and Top Navigation

#4116 closed bug (wontfix)

Opened February 11, 2009 12:02PM UTC

Closed February 19, 2009 03:37AM UTC

$('#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:
Description

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: http://ui.jquery.com/ui/ui.datepicker.js
Line: 1611
Attachments (0)
Change History (1)

Changed February 19, 2009 03:37AM UTC by kbwood comment:1

resolution: → wontfix
status: newclosed

To set the minDate (and other settings) use:

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