9
Answers

Having trouble with using "DatePicker" in MVC5 application

Trang Bartell

Trang Bartell

4y
527
1
Here is my code:
 
@Html.TextBoxFor(m => m.DTE_EFFECTIVE, new { @type = "date", @class = "form-control datepicker", @Value = Model.DTE_EFFECTIVE.ToShortDateString() }) 
 
Here is the page:
 
 
 
The DatePicker worked great.  I was able to select a date and saved to the database.  However, the only thing displayed was mm/dd/yyyy.  How can I get the date to display with the "datepicker"? Thank you for your help. 
Answers (9)