I created a edit view for a EF Model and have a problem with the datepicker. Whenever i try to edit a `dataset, the edit view don\'t show me the old date values.
Thi
type="date"
generates the browsers HTML-5 datepicker if supported. The specifications require that the value be formatted in ISO format (yyyy-MM-dd
) which is then displayed in accordance with the browsers culture.
Add the asp-format
to format the value, and remove the value
attribute (Tag Helpers correctly generate the value
attribute for correct 2-way model binding and you should never attempt to add it yourself)
Note the HTML-5 datepicker is not supported in IE, and only in recent versions of FireFox. If you want a consistent UI, then consider using a jQuery datepicker instead.