Ticket #5696 (closed bug: duplicate)

Opened 3 years ago

Last modified 8 months ago

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:
Blocking: Blocked by:

Description

Forum:  http://forum.jquery.com/topic/datepicker-bug-only-5-days-in-march-2011

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();
    },

Change History

comment:1 Changed 8 months ago by scott.gonzalez

  • Milestone changed from TBD to 1.11.0

comment:2 Changed 8 months ago by mikesherov

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #6978.

Note: See TracTickets for help on using tickets.