Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#5276 closed defect (fixed)

Calendar widget breaks at certain times

Reported by: guest Owned by: Bryan Forbes
Priority: high Milestone: 1.0.2
Component: Dijit Version: 1.0
Keywords: dojo.date Calendar Cc: leon.danser@…, Bryan Forbes
Blocked By: Blocking:

Description

In dojo 1.0.1, a line in date.js's dojo.date.add function causes the calendar widget to break at certain times of the day:

sum["setUTC"+property](sum["getUTC"+property]()+amount);

To reproduce the error, set the computer's time to 9:00AM and set the computer's timezone to (GMT +10:00) Brisbane, say. Now load up a calendar widget.

http://download.dojotoolkit.org/release-1.0.1/dojo-release-1.0.1/dijit/tests/test_Calendar.html

Here are the symptoms:
Try clicking the arrow to go to January on any calendar and it won't let you! Then try clicking back through the months the other way and it will skip November and any month with 30 days in it, and it will generally misbehave.

This happens in FF2 and IE.

removing the "UTC"s in that line (to match dojo 1.0.0) makes things work. ie.

sum["set"+property](sum["get"+property]()+amount);

The bug is reproducible at different time settings as well.
timezone: GMT +1:00, time: 00:10AM; timezone: GMT +2:00, time: 01:10AM etc.

Change History (6)

comment:1 Changed 12 years ago by Adam Peller

Cc: Bryan Forbes added
Milestone: 1.0.2

regression apparently caused by #5047

comment:2 Changed 12 years ago by Adam Peller

Owner: changed from Adam Peller to Bryan Forbes

comment:3 Changed 12 years ago by Adam Peller

Component: DateDijit

comment:4 Changed 12 years ago by Bryan Forbes

Resolution: fixed
Status: newclosed

(In [11718]) fixes #5276. fixes #5315.

  • Changed dojo.date.add to only use the setUTC/getUTC on intervals less than or equal to an hour.

comment:5 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: closedreopened

leaving open until checked into 1.0 branch... I'll take care of this. Thanks, Bryan!

comment:6 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: reopenedclosed

(In [11728]) Merge [11718] on to 1.0 branch. Fixes #5276, #5315

Note: See TracTickets for help on using tickets.