I have a UserProfile class that includes a birthdate as follows
I would like to include that date in an html date input.
When I made the type of the input "date", I got the nice native datepicker in Chrome. However, got no data...
<input class="form-control" id="DateOfBirth" name="DateOfBirth" type="date" value='@Model.UserProfile.DateOfBirth' required/>
I have tried converting the DateOfBirth to a date in various ways - e.g.
<input class="form-control" id="DateOfBirth" name="DateOfBirth" type="datetime" value='@Model.UserProfile.DateOfBirth.Date' required/>
but no luck and the date shows up in the input as 10/9/1972 12:00:00 AM with no datepicker.
Any help in getting this to work greatly appreciated.