I would like to do something like
model.PickupDate.ToString("d")
But MVC4 is not liking that very much. PickupDate
is a DateTime
field and I would like to strip off the time portion when displayed in the view, while keeping the new { id = "date1" }
code which binds the TextBoxFor
to the javasript datepicker. How can I display the Date portion only in this instance?
@Html.TextBoxFor(model => model.PickupDate, new { id = "date1" })