Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#4690 closed bug (worksforme)

Calling "option" before triggering show of datepicker causes datepicker to open

Reported by: erichmusick Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


When calling the "option" method on a datepicker input before the user has focused on the corresponding input field, the calendar will appear.

Steps to reproduce:

  1. Attach datepicker to an input element.
  1. Set an option on the datepicker.
$("input").datepicker("option", "minDate", new Date( 2009, 8, 31 ) );
  1. Load the page in any browser.

Expected Result: Datepicker will appear only once I click on the input field.

Actual Result: Datepicker appears immediately after the call to the option function.

See attached file.

Attachments (1)

DatePicker Bug.html (596 bytes) - added by erichmusick 14 years ago.

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by erichmusick

Attachment: DatePicker Bug.html added


comment:1 Changed 14 years ago by erichmusick

One other important note:

In the example, if I add the default CSS inside my <head> tag, this bug will not occur.

<link rel="stylesheet" href="" type="text/css" media="all" />

However, I would still consider this a bug, seeing as the JS is currently dependent on a correct set of CSS styles to show / hide the datepicker correctly.

comment:2 Changed 14 years ago by Scott González

Resolution: worksforme
Status: newclosed

The plugin's functional CSS is part of the plugin, it is not optional.

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.