Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Html.EditorFor( model => model.StartDate )
- @Html.EditorFor( model => model.StartDate.ToShortDateString() )
- public class MyViewModel
- {
- [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
- public DateTime StartDate { get; set; }
- ...
- }
- @model MyViewModel
- ...
- @Html.EditorFor(model => model.StartDate)
Add Comment
Please, Sign In to add comment