Ticket #5696 (closed bug: duplicate)
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
Note: See
TracTickets for help on using
tickets.

