Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#9018 closed defect (fixed)

[regression] DateTextBox: fires onChange twice

Reported by: Jarrod Carlson Owned by: Adam Peller
Priority: high Milestone: 1.3.1
Component: Dijit - Form Version: 1.3.0rc2
Keywords: dijit form datetextbox Cc:
Blocked By: Blocking:

Description

I found a previous ticket covering this issue: #5312

It looks like in the latest Dojo 1.3, this problem is still present. The Dijit tests themselves illustrate this problem: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_DateTextBox.html

Choose a date in the first box, and upon clicking the date, the text box to the right is set with the selected date, at 1:00 AM. As soon as the widget is blurred, the text box is updated again, this time with the date normalized to midnight.

I can't imagine this is "expected behavior", but if it is, could someone please explain why the first onChange event fires with the date set to 1:00 AM?

This occurred in both Safari 3 (Mac) and Firefox 3 (Mac).

Attachments (1)

9018.patch (1.2 KB) - added by Adam Peller 11 years ago.
Proposed patch to pass back dates set to midnight, as before 1.3

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by bill

Hmm, yeah, comparing against http://download.dojotoolkit.org/release-1.2.3/dojo-release-1.2.3/dijit/tests/form/test_DateTextBox.html, it is a regression in the sense that onChange is getting called twice.

I'm in Japan's timezone so in dojo 1.2.3 I get +9 (9AM), which is also weird, but the double onChange event in 1.3 is what concerns me more.

comment:2 Changed 11 years ago by bill

Owner: set to Douglas Hays

comment:3 Changed 11 years ago by Douglas Hays

Owner: changed from Douglas Hays to Adam Peller

Regression caused by #8521. onValueSelected is being called with a time component of 1am and time should be 0.

comment:4 Changed 11 years ago by Douglas Hays

Running test_TimeTextBox.html, I'm not seeing the onChange fire twice.

Changed 11 years ago by Adam Peller

Attachment: 9018.patch added

Proposed patch to pass back dates set to midnight, as before 1.3

comment:5 Changed 11 years ago by bill

Summary: Regression(?): DateTextBox and TimeTextBox fire onChange twice[regression] DateTextBox: fires onChange twice

comment:6 Changed 11 years ago by Adam Peller

checked into trunk in [17188]

comment:7 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

fixed in 1.3 branch in [17257]

comment:8 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.