Skip to main content

Bug Tracker

Side navigation

#3511 closed bug (invalid)

Opened October 22, 2008 05:47PM UTC

Closed October 12, 2009 11:21PM UTC

ui.Datepicker: November 2 is present twice in 2008

Reported by: h3 Owned by:
Priority: critical Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: datepicker Cc:
Blocked by: Blocking:
Description

The date november 2 appears twice in 2008 .. it's present on the demo: http://docs.jquery.com/UI/Datepicker

Attachments (0)
Change History (3)

Changed October 31, 2008 09:26PM UTC by piptastic comment:1

This is related to daylight savings time ending on Nov 2nd. Also, reproducibility may be affected by timezone of user and time of day.

Changed November 06, 2008 08:58PM UTC by jehinkle comment:2

The problem is daylight savings time. The Date object sets the year,month and day, but with no time specified defaults to midnight. So when the time increments by 1 day, and then daylight savings sets it back 1 hour, you get two November 2 on the calendar. Include a time greater than 1 when the date object is created and problem is solved.

Change line 1272 in ui.datepicker.js or line 5801 in jquery.ui.all.js from:

var printDate = new Date(drawYear, drawMonth, 1 - leadDays);

to:

var printDate = new Date(drawYear, drawMonth, 1 - leadDays,12);

Changed October 12, 2009 11:21PM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .