I'm following the example here: http://demos.kendoui.com/web/datepicker/rangeselection.html
Here is how I'm defining my fields inside of an EditorTemplate:
<div class="editor-label">
@Html.RequiredLabelFor(model => model.StartDate)
</div>
<div class="editor-field">
@Html.Kendo().DatePickerFor(model => model.StartDate).Value(DateTime.Now).Max(DateTime.Now.AddDays(2)).Events(e => e.Change("startChange"))
@Html.ValidationMessageFor(model => model.StartDate)
</div>
<div class="editor-label">
@Html.RequiredLabelFor(model => model.EndDate)
</div>
<div class="editor-field">
@Html.Kendo().DatePickerFor(model => model.EndDate).Value(DateTime.Now.AddDays(2)).Min(DateTime.Now).Events(e => e.Change("endChange"))
@Html.ValidationMessageFor(model => model.EndDate)
</div>
I am using the EditorTemplate within a KendoUI Grid that has a create button that is in popup mode. The problem is that when I view the popup, the initial default value for the EndDate picker is always set to the current date, even though when I look inside the page source, the "value" attribute for the DatePicker is set to my future date:
value=\"2013-12-06\"
Why is the default value displayed in the DatePicker always the current date regardless of the value I am passing to it?