Skip to main content

Search and Top Navigation

#5676 closed bug (fixed)

Opened May 30, 2010 05:21AM UTC

Closed June 14, 2010 08:47AM UTC

Last modified August 04, 2010 01:18AM UTC

DatePicker Dialog defaultDate incorrect behaviour

Reported by: dsdsico Owned by:
Priority: critical Milestone: 1.8.3
Component: ui.datepicker Version: 1.8.1
Keywords: incorrect defaultDate popup behaviour Cc:
Blocked by: Blocking:
Description

The following code displays the defaultDate just fine:

<script type="text/javascript">
// Datepicker
$('.datepicker').datepicker({
   defaultDate: new Date(2010, 4, 25)
});
</script>

<div class="datepicker"></div>

However, as soon as I want to use the popup behaviour by changing the DIV element into a INPUT element, the defaultDate only gets a rollover state, which is gone as soon as I hover my mouse over the calendar (the javascript remains the same):

<input class="datepicker" />

I attached two screenshots of the situation: the first (correct) one displays an inline calendar with the selected date set to 25/5/2010 (although I initialized a Date() object with 25/4/2010, is this another bug?), the second (incorrect) one displays a popup calendar, where day 25 is merely hovered instead of selected.

I also attached index.html demonstrating the issue.

Thanks

Attachments (1)
Change History (4)

Changed May 30, 2010 09:08AM UTC by rdworth comment:1

Changed June 13, 2010 04:19PM UTC by afcapel comment:2

I've made a simple patch that seems to solve the issue:

http://github.com/afcapel/jquery-ui/commit/d2c046ca2654118b340cad96f87c68a470125cac

Hope it helps!

Changed June 14, 2010 08:47AM UTC by rdworth comment:3

resolution: → fixed
status: newclosed

Thanks afcapel. Fixed in eb13c01

Changed August 04, 2010 01:18AM UTC by scottgonzalez comment:4

milestone: 1.91.8.3