I have this attribute in my view model:
[DataType(DataType.DateTime)] public DateTime? StartDate { get; set; }
If I want to display the dat
That works for me
[DataType(DataType.DateTime)] [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]