Bug Tracker

Modify

Ticket #3579 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

jQuery UI: Calendar date repeats in November 2008

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

Description

When the calendar pops up, November 2 appears twice on the calendar shifting all dates up by one day.

For example, november 3 should be Monday. The dates shown instead are: Sat Nov 1 Sun Nov 2 Mon Nov 2 Tue Nov 3

Attachments

calendar.tiff Download (44.0 KB) - added by gcp0703 5 years ago.
TIFF screenshot of the problem

Change History

Changed 5 years ago by gcp0703

TIFF screenshot of the problem

comment:1 Changed 5 years ago by jehinkle

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

comment:2 Changed 5 years ago by flesler

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

This belongs to the  UI Bug Tracker.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.