Opened 13 years ago

Closed 13 years ago

#4513 closed bug (fixed)

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.

Change History (3)

comment:1 Changed 13 years ago by Jörn Zaefferer

Milestone: TBD1.7.2

comment:2 Changed 13 years ago by Jörn Zaefferer


comment:3 Changed 13 years ago by kbwood

Resolution: fixed
Status: newclosed

Duplicate of #4514. Fixed in r2696.

Note: See TracTickets for help on using tickets.