Ticket #5676 (closed bug: fixed)
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: | |
| Blocking: | Blocked by: |
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
Change History
Changed 3 years ago by dsdsico
-
attachment
ticket-5676-demonstration.zip
added
comment:2 Changed 3 years ago by afcapel
I've made a simple patch that seems to solve the issue:
http://github.com/afcapel/jquery-ui/commit/d2c046ca2654118b340cad96f87c68a470125cac
Hope it helps!


HTML / JS / CSS + 2 screenshots demonstrating the issue