Opened 15 years ago

Closed 15 years ago

#1677 closed defect (wontfix)

DropdownTimePicker doesn't function as form widget

Reported by: bill Owned by: tk
Priority: high Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: Cc: Adam Peller
Blocked By: Blocking:


DropdownTimePicker? needs to have a hidden field with the time set in a universal format, just like DropdownDatePicker?. Time is displayed or input in local format, but value passed to/from the server is RFC format. Same as datepicker. The two values need to always be synchronized.

Attachments (2)

DropdownTimePicker.js.patch (863 bytes) - added by [email protected] 15 years ago.
Patch for the bug
DropdownTimePicker.js.2.patch (873 bytes) - added by [email protected] 15 years ago.
Updated patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by Adam Peller

Cc: Adam Peller added

more specifically, we should probably redo the dropdowntimepicker based on the latest dropdowndatepicker; unfortunately, the code forked in early September before some significant work was done. Check with Eugene -- I think he wanted to change things anyway.

comment:2 Changed 15 years ago by [email protected]

Fix for this: DropdownTimePicker?.js:

about line 52, add the name field, should look like:

value: "", name: "",

A few lines after, add the name passing, should look like this:

fillInTemplate: function(){; dojo.widget.DropdownTimePicker?.superclass.fillInTemplate.apply(this, arguments);

That's it!

Happy dojo!

Changed 15 years ago by [email protected]

Attachment: DropdownTimePicker.js.patch added

Patch for the bug

comment:3 Changed 15 years ago by Adam Peller

we ought to use the valueNode attachpoint on the hidden field in DropdownContainer? like DropdownDatePicker? does so that the widgets will be consistent.

comment:4 Changed 15 years ago by guest

Umh... the onSetTime function also needs to update the valueNode after picking a new Time graphically:

this.valueNode.value = this.inputNode.value;

Changed 15 years ago by [email protected]

Updated patch

comment:5 Changed 15 years ago by [email protected]

valueNode should have date in some standard format by default, just like DropDownDatePicker?. Using same formast as displayNode -> not good. (etc, some locales uses 24h some am/pm thingie)

comment:6 Changed 15 years ago by bill


comment:7 Changed 15 years ago by [email protected]

I noticed saveFormat is not sending data correctly to the server, when using a specific timePattern such as "HH:mm". I tracked it to the _syncValueNode function in DropdownTimePicker?.js at line 222. I believe datePattern should be timePattern. Hope this helps or is already fixed.

comment:8 Changed 15 years ago by Adam Peller

Resolution: wontfix
Status: newclosed

Not moving to dijit. There should be a compliant replacement eventually in #599.

Note: See TracTickets for help on using tickets.