Skip to main content

Search and Top Navigation

#4513 closed bug (fixed)

Opened May 04, 2009 10:44PM UTC

Closed June 11, 2009 10:31AM UTC

datepicker doesn't set default date in dialog

Reported by: quasipickle Owned by:
Priority: major Milestone: 1.8
Component: ui.datepicker Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

In IE 8 (at least - probably IE7 as well), when creating a datePicker with the dialog option, setting the second argument to a Date object does not set the default date of the datepicker. The default date must be set in the settings object with 'defaultDate'.

If 'defaultDate' is not set, but the second argument is set, the datepicker defaults to the current month.

Test page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type = "text/javascript" src = ""></script>
<script type = "text/javascript" src = "ui.core.js"></script>
<script type = "text/javascript" src = "ui.datepicker.js"></script>
<script type = "text/javascript">
	var oDate = new Date();

<input id = "test" type = "text" />

If you take out the last argument (the settings object), the datepicker will show a year of 2009. If the last argument is present, it will show a year of 1990.

Attachments (0)
Change History (3)

Changed May 07, 2009 10:04AM UTC by jzaefferer comment:1

milestone: TBD1.7.2

Changed May 07, 2009 01:29PM UTC by jzaefferer comment:2


Changed June 11, 2009 10:31AM UTC by kbwood comment:3

resolution: → fixed
status: newclosed

Duplicate of #4514. Fixed in r2696.