我正在我的 MVC 5 应用程序中实现 kendo 日期选择器。我不确定出于什么原因没有使用 datetimepicker 中选择的内容设置 viewmodel 属性
<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>