Skip to main content

Search and Top Navigation

#4690 closed bug (worksforme)

Opened July 16, 2009 02:19PM UTC

Closed July 21, 2009 03:02AM UTC

Last modified October 11, 2012 09:15PM UTC

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:
Description

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.

$("input").datepicker();

2. Set an option on the datepicker.

$("input").datepicker("option", "minDate", new Date( 2009, 8, 31 ) );

3. 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)
Change History (3)

Changed July 16, 2009 02:23PM UTC by erichmusick comment:1

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="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" 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.

Changed July 21, 2009 03:02AM UTC by scottgonzalez comment:2

resolution: → worksforme
status: newclosed

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

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted