i have searched and tried to do it in many ways (changing the DataFormatString) but none of them are working. I'm also using datepicker for my Date fields.
[Required]
[Column(TypeName = "date")]
[DataType(DataType.Date)]
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd.MM.yy}")]
public DateTime? Date { get; set; }
and this is my view
@Html.LabelFor(model => model.Server_Cadworker.Date, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@{ Html.EnableClientValidation(false); }
@Html.EditorFor(model => model.Server_Cadworker.Date, new { htmlAttributes = new { @class = "form-control" } })
@{ Html.EnableClientValidation(true); }
@Html.ValidationMessageFor(model => model.Server_Cadworker.Date, "", new { @class = "text-danger" })
</div>
any one has answer for this issue?
Thanks