jQueryMobile – DateBox needs this to work properly:
<label for="mydate">Some Date</label>
<input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "flipbox"}'>
But in Asp.Net MVC Razor Engine I have this for the Editor Label & Field:
<div class="editor-label">
@Html.LabelFor(model => model.ReleaseDate)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.ReleaseDate)
@Html.ValidationMessageFor(model => model.ReleaseDate)
</div>
Is there a way to integrate the two things to have a jQueryMobile – DateBox in my Asp.Net MVC application?
Sorry, nothing easier of HtmlAttributes.
So I risolved this question out.
The solution, if someone needs too:
Only note the @ character before every attribute, the _ (underscore) character instead of the – (dash) one for the composite words attributes and the TextBoxFor instead of EditorFor.
Bye!