Calling HtmlAttributes
to set the id
sets the value for a wrapper div. InputHtmlAttributes
is what is needed! This affects the actual input control so that a unique id
can be assigned.
@(Html.Telerik().DatePickerFor(x => Model.DataField)
.InputHtmlAttributes(new {id="UniqueID"}))
This yields:
<div class="t-widget t-datepicker">
<div class="t-picker-wrap">
<input class="t-input" .... id="UniqueID" name="DataField" type="text">
and works as desired.