Mam dziwny problem z formatem daty podczas wprowadzania danych a mianowicie
Model:
[Required(ErrorMessage="This field is required")]
[Display(Name = "Birth Date")]
[DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode=true)]
public DateTime birthDate { get; set; }
View:
@Html.LabelFor(model => model.birthDate)
@Html.TextBoxFor(model => model.birthDate, new { id = "datepicker" })
@Html.ValidationMessageFor(model => model.birthDate)
i chcę wprowadzić datę w formacie "dd-MM-yyyy", wywala błąd:The value '24-02-2014' is not valid for Birth Date.
Jak to poprawić? Dzięki