我在visual studio 2013中使用asp.net mvc,其中一个字段是日期输入,但是当点击该字段并在该字段中有焦点时,自动HTML5日期选择器不会出现.如果我手动放置该字段,它会出现但是它不会映射到该特定字段.在数据注释中,我已经包含了[DataType(DataType.Date)],但这并没有提出HTML5日期选择器.我如何在asp.net中实现这一点,特别是该领域的代码
<div class="form-group">
@Html.LabelFor(model => model.CustomerJoinDate, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.CustomerJoinDate, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.CustomerJoinDate, "", new { @class = "text-danger" })
</div>
</div>
Run Code Online (Sandbox Code Playgroud)