Ticket #6922 (closed defect: fixed)
Form: getValues()/setValues() won't restore blank DateTextBox
| Reported by: | bill | Owned by: | doughays |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 1.1.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
If no value has been set for a DateTextBox, Form.getValue()s is passed an undefined value by DateTextBox.getValue(). This serializes to JSON OK, as "Mydate": undefined, and de-serializes back to an undefined value. However when Form.setValues passes this on to _DateTimeTextBox.setValue, it is essentially ignored - if there is already a value set in the control, it remains there rather than being unset as you would expect (and this is true whether it has been converted to and from JSON, or the value retrieved by getValues is supplied directly back to setValues).
Same root cause as #6827 but listing as a separate ticket since it's a different manifestation.