I have 2 pages. A create page and an edit page. When I choose a date on the create page and submit it, it all goes right. But when I read the date out the database and set it in the input field, it won't display the date.
When I submit the create page, the date looks like 9/05/2016 0:00:00 in the database.
Create page:
@Html.EditorFor(model => model.Date, new{htmlAttributes = new{@class = "form-control",type = "date"}})
edit page:
@Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control", @Value = ViewBag.Date, type = "date" } })
Domain:
public DateTime Date{ get; set; }