Trang Bartell

Trang Bartell

  • 2k
  • 21
  • 177

Having trouble with using "DatePicker" in MVC5 application

Oct 28 2020 12:31 PM
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)