Ticket #5276 (closed defect: fixed)
Calendar widget breaks at certain times
| Reported by: | guest | Owned by: | BryanForbes |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.2 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | dojo.date Calendar |
| Cc: | leon.danser@…, BryanForbes |
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.