Ticket #5276 (closed defect: fixed)

Opened 6 months ago

Last modified 5 months ago

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.

Change History

Changed 6 months ago by peller

  • cc BryanForbes added
  • milestone set to 1.0.2

regression apparently caused by #5047

Changed 6 months ago by peller

  • owner changed from peller to BryanForbes

Changed 5 months ago by peller

  • component changed from Date to Dijit

Changed 5 months ago by BryanForbes

  • status changed from new to closed
  • resolution set to fixed

(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.

Changed 5 months ago by peller

  • status changed from closed to reopened
  • resolution deleted

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

Changed 5 months ago by peller

  • status changed from reopened to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.