dijit.form.Select does not allow creation without a selection (at least declaratively)
When you create a dijit.form.Select declaratively and you don't mark a option with the selected attribute, the first one is automatically selected.
So in fact, although you can specify the widget as "required" it is not potentially possible (not at least declaratively) to have an "unselected" Select.
I tried by adding an empty option, or even an option with a empty value as the first option, and it certainly sets the form as not valid, but it doesn't go back to being valid when you select one of the other options.So, or specifying and empty option is not supported or there is a bug related to it.
Change History (5)
Owner: |
set to Douglas Hays
|
Milestone: |
tbd →
1.6
|
Status: |
new →
assigned
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Component: |
Dijit →
Dijit - Form
|
(In [23378]) Fixes #11687. Check both value and label == "" to distinguish a separator node from an empty option that has a label but also has value == "". Added automated test to show that required is working. Adjusted some automated test timings to work on a slow machine. !strict