I have a @Html.TextboxFor and its connected to datepicker class, it also displays a date out a database. How ever it displays the date in the wrong format. When the date is displayed out the DB, that is the only time the date is in the wrong format.
@Html.TextBoxFor(model => model.AdvertiserSignDate, new { id = "txtAdvDate", @readonly = "true", @class = "DatePicker" })
This code below displays the date in the correct format but just on a line below the text box.
@(Model == null ? string.Empty : String.Format("{0:dd MMM yyyy}", Model.AdvertiserSignDate))
I would like to add the formatting of the line above to the first line, so that my textbox displays the date in the correct format and has the function of the date picker.
How can i merge these two lines of code?
This works.