【发布时间】:2021-10-13 14:01:37
【问题描述】:
这可能很简单,但我在上面找不到任何东西。我的代码有效,但我不知道如何设置默认日期:
<div class="col-md-12 text-center">
@using (Html.BeginForm())
{
<label asp-for="StartDate"></label><br />
@Html.EditorFor(model => model.StartDate, new { htmlattributes = new { @class = "datepicker" } })
<br />
<label asp-for="EndDate"></label><br />
@Html.EditorFor(model => model.EndDate, new { htmlattributes = new { @class = "datepicker" } })
}
</div>
谁能指出我正确的方向?谢谢!
【问题讨论】:
标签: asp.net-core razor bootstrap-4