Opened 13 years ago

Closed 12 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:

Description

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 manel.clos@… 13 years ago.
Patch for the bug
DropdownTimePicker.js.2.patch (873 bytes) - added by manel.clos@… 13 years ago.
Updated patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 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 13 years ago by manel.clos@…

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(){

this.valueNode.name=this.name; dojo.widget.DropdownTimePicker?.superclass.fillInTemplate.apply(this, arguments);

That's it!

Happy dojo!

Changed 13 years ago by manel.clos@…

Attachment: DropdownTimePicker.js.patch added

Patch for the bug

comment:3 Changed 13 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 13 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 13 years ago by manel.clos@…

Updated patch

comment:5 Changed 13 years ago by joose@…

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 13 years ago by bill

Milestone: 0.4.10.5

comment:7 Changed 13 years ago by dharken@…

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