Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#4034 closed defect (fixed)

blank NumericTextBox support

Reported by: bill Owned by: Douglas Hays
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


As explained in

<input dojotype=NumericTextBox>


<input dojotype=NumericTextBox value=""> 

should show a blank textbox rather than 0, to allow optional number fields in a form, and also because that's how normal HTML works.

Due to the constraints of the parser, "value" in the prototype needs to be a number, not null. So, numeric widgets should define value as NaN and display/transmit an NaN value as the empty string. IE, if value==NaN getValue() and getDisplayedValue()? should return null. Same way as DateTextBox? is working.

The parser (str2obj) should be changed to return NaN rather that 0 for a blank value.

See also #4033.

Change History (3)

comment:1 Changed 15 years ago by Douglas Hays

(In [10019]) References #4034. Change the str2obj to return NaN for value="" wrt number attributes.

comment:2 Changed 15 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [10020]) Fixes #4034. Default NumberTextBox? to NaN instead of 0.

comment:3 Changed 11 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.