0
我在我的MVC 5應用程序中實現了kendo datepicker。我不知道是什麼原因視圖模型屬性沒有被設定什麼是在的DateTimePickerkendo datetimepicker未將值設置爲視圖模型
<div class="form-group">
@Html.LabelFor(model => model.ContractStartDate, htmlAttributes: new { @class = "control-label col-md-5" })
<div class="col-md-6">
@*@Html.EditorFor(model => model.ContractStartDate, new { htmlAttributes = new { @class = "form-control" } })*@
@(Html.Kendo().DatePickerFor(model => model.ContractStartDate)
.Name("contractdatepicker")
.Value("10/10/2011")
.HtmlAttributes(new { style = "width: 100%" })
)
@Html.ValidationMessageFor(model => model.ContractStartDate, "", new { @class = "text-danger" })
</div>
</div>