Skip to main content

Bug Tracker

Side navigation

#3573 closed bug (invalid)

Opened November 04, 2008 03:39PM UTC

Closed November 06, 2008 09:47PM UTC

Last modified March 14, 2012 11:56PM UTC

UI Datepicker displays November incorrectly

Reported by: evanwright Owned by: flesler
Priority: major Milestone: 1.3
Component: unfiled Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

The UI Datepicker displays the days of November (of any year) incorrectly. For 2008 the days are displayed as Sa 1, Su 2, Mo 2, Tu 3, We 4 ...etc...

Attachments (0)
Change History (3)

Changed November 06, 2008 09:07PM UTC by jehinkle comment:1

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);


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

Changed November 06, 2008 09:47PM UTC by flesler comment:2

resolution: → invalid
status: newclosed

This belongs to the UI Bug Tracker.

Changed January 19, 2011 09:28PM UTC by Marvin comment:3


I have a program where i need to calculate the cost of be hosted in a hotel. The time to be in the hotel is obtained using datepicker arrival and departure. Into that date range is found the second sunday of november.

Using the daylight savings time, the total amount is duplicated.

I've used the suggestion above but it doesn't work for me.

I am using windows xp, ff3.6.13

If you need to know more about my problem

let me know please.

Thanks in advance