This is an asp.net MVC mobile app - I have a From textbox, and a Nights text box - the standard view is:
<li data-role="fieldcontain">
@Html.LabelFor(m => m.From)
@Html.TextBoxFor(m => m.From)
@Html.ValidationMessageFor(m => m.From)
</li>
<li data-role="fieldcontain">
@Html.LabelFor(m => m.Nights)
@Html.TextBoxFor(m => m.Nights)
@Html.ValidationMessageFor(m => m.Nights)
</li>
What would I change the Razor markup above to add in data-options and data-role:
ie.
@Html.TextBoxFor(m => m.From)
to
<input name="From" type="date" data-options='{"mode":"datebox"}' data-role="datebox" id="From" />
and
@Html.TextBoxFor(m => m.Nights)
to
<input type="range" name="nights" id="nights" value="1" min="0" max="28" />
(these are a date plugin - and the slider control in Mobile)
EDIT: I've got the second part:
@Html.TextBoxFor(m => m.Nights, new { @type = "range", min = 1, max = 60 })