Opened 11 years ago

Closed 11 years ago

#12470 closed defect (invalid)

If data-dojo-type html attribute is used instead of dojoType, dijit.form.DateTextBox does not submit a value.

Reported by: tubalmartin Owned by: Douglas Hays
Priority: high Milestone: 1.6.1
Component: Dijit - Form Version: 1.6.0
Keywords: datetextbox, dojotype, html5, data, attribute, data-dojo-type Cc:
Blocked By: Blocking:


If we declare an input using the "data-dojo-type" html attribute

<input type="text" name="dojocalendar" data-dojo-type="dijit.form.DateTextBox">

the calendar renders and seems to work fine, BUT, when the form is submitted, value is sent to the server. Why? because the hidden input Dojo creates and updates when the user selects a date does not have a "name" attribute (and so no key is sent to the server containing the value).

However, when the input is declared using the "dojoType" html attribute

<input type="text" name="dojocalendar" dojoType="dijit.form.DateTextBox">

it works as expected and the hidden input gets a name attribute.

Hope you fix this ASAP and review other digits as well since they may be affected by this bug or not completely updated to support the new html5 "data-" attributes.

That's all guys!!

Change History (2)

comment:1 Changed 11 years ago by Kenneth G. Franqueiro

This is probably working as release-noted:

If degradation is a concern, duplicate native attributes in data-dojo-props and on the node reference, as widget parameters are no longer read from the node attributes individually.

In other words, you should also (or primarily, if degradation isn't a concern) specify name as a property inside data-dojo-props.

This is the result of the decision taken after a lengthy discussion on #11490.

comment:2 Changed 11 years ago by bill

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.