我有模特
[DataType(DataType.Date)]
[Display(ResourceType = typeof(Resources.Resources), Name = "txtDateOfBirthday")]
public DateTime? DateOfBirth { get; set; }
我需要在我的观看日期显示,但它不起作用。 我的观点看起来像这样:
@Html.LabelFor(model => model.DateOfBirth, new {@class = "control-label"})
@Html.TextBoxFor(model => model.DateOfBirth, new {@class = "form-control", @type = "date"})
@Html.ValidationMessageFor(model => model.DateOfBirth)