#5209 closed defect (fixed)
DateTextBox widget function setValue is not called onValueSelected event
Reported by: | guest | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.0.1 |
Component: | Dijit - Form | Version: | 1.0 |
Keywords: | DateTextBox | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
DateTextBox? widget setValue function is not executing when the date from the popup calendar is changed. setValue is called on the onblur event handler.
I am trying to attach an event when the date from the widget is changed.
steps to reproduce the bug:
- click the textbox
- choose the date from the pop up calendar.
- the calendar is closed.
- value is updated in the textbox. but setValue (and attached event) are not called
- click anywhere on the screen. onBlur event is fired and the attached event.
Prajwala
Attachments (1)
Change History (8)
comment:1 Changed 13 years ago by
Changed 13 years ago by
Attachment: | TimeTextBox.patch added |
---|
comment:3 Changed 13 years ago by
Hi Bill,
onChange is associated only with the "view" of the widget. I am manipulating DateTextBox? both in the html UI and programmatic (not triggered by user interaction in the DateTextBox? html element itself). I am using the setValue to change the DateTextBox? programmaticaly.
I want to attach an event whenever the value is changed, it doesnt matter if the change was done using the UI or not. I expected setValue to be THE function.
The problem in setting my handler both on setValue and onChange is that setValue is called onBlur event, so my attached function would be called twice for an UI interaction.
I also could solve my problem calling my attached event after every call I do to setValue, and attaching it to onChange. But I guess it is not a "clean" solution. ps. there is a problem in my patch. whenever I select a date on the popup calendar (and dont do anything to cause a onBlur on the DateTextBox?). If change the displayed window (alt-tab) when i come back to the browser the calendar pops-up again.
Prajwala & Eduardo
comment:4 Changed 13 years ago by
Milestone: | → 1.1 |
---|---|
Owner: | set to Douglas Hays |
comment:5 Changed 13 years ago by
Thanks Bill. I didnt try with 1.0.1 yet but I know I will have another problem...
I want to attach different events to:
- changes made by the UI
- general changes (UI or programmatically)
I was using onChange and setValue respectively. If I am supposed to use onChange for general changes, what am I supposed to use on UI only modifications?
Prajwala & Eduardo
comment:6 Changed 13 years ago by
Milestone: | 1.1 → 1.0.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Hmm, I don't know any easy way to do that, I think you are on your own if you want to differentiate those two things.
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
I solved the issue calling setValue on onValueSelected event handler. And removing setValue from onBlur event handler. I am not sure about the impact of removing this from onBlur, but it is working fine for me :)
patch attached.
Prajwala