In asp.net MVC 5, I have a form that displays data from a DTO object:
public class FieldDTO
{
[DataType(DataType.DateTime)]
[DisplayFormat(ApplyFormatInE
because default format for date time is mm/dd/yyyy. your date consider as a month then it gives error for that you need to add culture format.
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
and in your js file in that you implement datepicker include code like
jQuery.validator.methods["date"] = function (value, element) { return true; }
i have same issue now works fine for me i hope it should help you.