#721 closed defect (fixed)
DropdownDatePicker + value from submit
Reported by: | Owned by: | Adam Peller | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Dropdowndatepicker | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
DropdownDatepicker? should save it's value to hidden input field in rfc-format when changing the date. Also this could be configurable thing: <div dojoType="dropdowndatepicker" displayFormat="%d.%m.%y" saveFormat="RFC" or saveFormat="%m/%d/%y" .. />
Attachments (6)
Change History (16)
comment:1 Changed 15 years ago by
Keywords: | ComboBox added; Dropdowndatepicker removed |
---|
comment:2 Changed 15 years ago by
Keywords: | Dropdowndatepicker added; ComboBox removed |
---|
Ush, my mistake. Combobox is found from ticket #730
comment:3 Changed 15 years ago by
Basically this bug is saying that the display format of the date should be independent from the format sent over the wire, because the display format will change based on locale settings, whereas the value sent over the wire should be locale-independent.
This functionality would make life easier for the server, but it complicates the DropDownDatePicker? code. Note that the user can type in a date manually, rather than clicking the drop down; in that case the DropDownDatePicker? would need code to parse the date and convert it to RFC format.
comment:4 Changed 15 years ago by
Here is somewhat patch to fix part of this:
$ svn diff DropdownContainer.js Index: DropdownContainer.js =================================================================== --- DropdownContainer.js (revision 4162) +++ DropdownContainer.js (working copy) @@ -29,7 +29,7 @@ containerToggleDuration: 150, containerAnimInProgress: false, - templateString: '<div><span style="white-space:nowrap"><input type="text" value="" style="vertical-align:middle;" dojoAttachPoint="inputNode" autocomplete="off" /> <img src="" alt="" dojoAttachPoint="buttonNode" dojoAttachEvent="onclick: onIconClick;" style="vertical-align:middle; cursor:pointer; cursor:hand;" /></span><br /><div dojoAttachPoint="containerNode" style="display:none;position:absolute;width:12em;background-color:#fff;"></div></div>', + templateString: '<div><span style="white-space:nowrap"><input name="" type="text" value="" style="vertical-align:middle;" dojoAttachPoint="inputNode" autocomplete="off" /> <img src="" alt="" dojoAttachPoint="buttonNode" dojoAttachEvent="onclick: onIconClick;" style="vertical-align:middle; cursor:pointer; cursor:hand;" /></span><br /><div dojoAttachPoint="containerNode" style="display:none;position:absolute;width:12em;background-color:#fff;"></div></div>', templateCssPath: "", fillInTemplate: function(args, frag){
$ svn diff DropdownDatePicker.js Index: DropdownDatePicker.js =================================================================== --- DropdownDatePicker.js (revision 4162) +++ DropdownDatePicker.js (working copy) @@ -14,7 +14,7 @@ iconTitle: "Select a Date", zIndex: "10", datePicker: null, - + name: "", dateFormat: "%m/%d/%Y", date: null, @@ -37,6 +37,7 @@ dojo.event.connect(this.datePicker, "onSetDate", this, "onSetDate"); this.containerNode.style.zIndex = this.zIndex; this.containerNode.style.backgroundColor = "transparent"; + this.inputNode.name=this.name; }, onSetDate: function(){
comment:6 Changed 15 years ago by
Here is updated patch to save dropdownDatepickers value as RFC value to hidden field.
$ svn diff DropdownDatePicker.js DropdownContainer.js html/DatePicker.js Index: DropdownDatePicker.js =================================================================== --- DropdownDatePicker.js (revision 4162) +++ DropdownDatePicker.js (working copy) @@ -14,7 +14,7 @@ iconTitle: "Select a Date", zIndex: "10", datePicker: null, - + name: "", dateFormat: "%m/%d/%Y", date: null, @@ -37,10 +37,12 @@ dojo.event.connect(this.datePicker, "onSetDate", this, "onSetDate"); this.containerNode.style.zIndex = this.zIndex; this.containerNode.style.backgroundColor = "transparent"; + this.valueNode.name=this.name; }, onSetDate: function(){ this.inputNode.value = dojo.date.format(this.datePicker.date, this.dateFormat); + this.valueNode.value = this.datePicker.storedDate; this.hideContainer(); }, Index: DropdownContainer.js =================================================================== --- DropdownContainer.js (revision 4162) +++ DropdownContainer.js (working copy) @@ -29,7 +29,7 @@ containerToggleDuration: 150, containerAnimInProgress: false, - templateString: '<div><span style="white-space:nowrap"><input type="text" value="" style="vertical-align:middle;" dojoAttachPoint="inputNode" autocomplete="off" /> <img src="" alt="" dojoAttachPoint="buttonNode" dojoAttachEvent="onclick: onIconClick;" style="vertical-align:middle; cursor:pointer; cursor:hand;" /></span><br /><div dojoAttachPoint="containerNode" style="display:none;position:absolute;width:12em;background-color:#fff;"></div></div>', + templateString: '<div><span style="white-space:nowrap"><input type="hidden" name="" value="" dojoAttachPoint="valueNode" /><input name="" type="text" value="" style="vertical-align:middle;" dojoAttachPoint="inputNode" autocomplete="off" /> <img src="" alt="" dojoAttachPoint="buttonNode" dojoAttachEvent="onclick: onIconClick;" style="vertical-align:middle; cursor:pointer; cursor:hand;" /></span><br /><div dojoAttachPoint="containerNode" style="display:none;position:absolute;width:12em;background-color:#fff;"></div></div>', templateCssPath: "", fillInTemplate: function(args, frag){
Changed 15 years ago by
Attachment: | dropdowndatepicker-fix.patch added |
---|
Patch to fix dropdowndatepicker (submitting, name, value.. etc)
Changed 15 years ago by
Attachment: | dropdowndatepicker-fix.2.patch added |
---|
Patch to fix dropdowndatepicker (submitting, name, value.. etc) also fixes when date is inputted manually
Changed 15 years ago by
Attachment: | dropdowndatepicker-fix.3.patch added |
---|
little fix to fix little thing. Thanks to dimas.
comment:7 Changed 15 years ago by
Owner: | changed from anonymous to dylan |
---|---|
Status: | new → assigned |
comment:8 Changed 15 years ago by
Owner: | changed from dylan to Adam Peller |
---|---|
Status: | assigned → new |
Changed 14 years ago by
Attachment: | dddp-i18n-submit-r5597.patch added |
---|
cumulative i18n changes from ticket 1008 with an adaptation of Joose's patch
Changed 14 years ago by
Attachment: | dddp-i18n-submit-r5629.patch added |
---|
cumulative i18n changes from ticket 1008 with an adaptation of Joose's patch
Changed 14 years ago by
Attachment: | test-dddp-i18n-submit-r5629.patch added |
---|
tests for dddp localization and serialization
comment:9 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
ComboBox? places (in some cases) wrong value to field named in HTML... Consider this:
when form is read, foo's value is "aaa" or "bbb" or "ccc", when it should be 1,2 or 3. OF course, this behaviour should be configured behavior, because it is not wanted always. It places the "key" to foo_selected, but it's not good if we already have software to handle foo as key.