我在 kedno UI 中验证此日期格式时遇到问题:dd.MM.yyyy
对于我的文化(CS-CZ)剑道使用此模式:d. M. yyyy
,但主要使用的是格式dd.MM.yyyy
。
我尝试了一切,但还没有成功:/
我的模型:
public DateTime? ExpirationDate { get; set; }
我的剑道形式:
<div class="form-group">
@Html.LabelFor(model => model.ExpirationDate, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<div class="checkbox">
@(Html.Kendo().DatePickerFor(model => model.ExpirationDate)
.Name("ExpirationDate")
.Culture("cs-CZ")
.HtmlAttributes(new { style = "width:150px" })
)
@Html.ValidationMessageFor(model => model.ExpirationDate, "", new { @class = "text-danger" })
</div>
</div>
谢谢!