Skip to main content

Search and Top Navigation

#5696 closed bug (duplicate)

Opened June 06, 2010 11:54PM UTC

Closed October 17, 2012 04:00AM UTC

Datepicker bug: only 5 days in March 2011

Reported by: kbwood Owned by:
Priority: major Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.1
Keywords: timezone Cc:
Blocked by: Blocking:


Datepicker fails in the Amman timezone with daylight savings applied.

The problem is that daylight saving in Amman starts at midnight on April 1. JavaScript "helpfully" adjusts that time by subtracting an hour, moving it back to March. This then breaks the days-in-month calculation resulting in the shortened month. To correct it you can change the ''_getDaysInMonth'' function:

    _getDaysInMonth: function(year, month) {
        return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
Attachments (0)
Change History (2)

Changed October 11, 2012 09:04PM UTC by scottgonzalez comment:1

milestone: TBD1.11.0

Changed October 17, 2012 04:00AM UTC by mikesherov comment:2

resolution: → duplicate
status: newclosed

Duplicate of #6978.