Reputation: 6328
is it possible to format a text box at page level (not viewmodel) so a datetime can exclude the time stamp?
i cant edit the viewmodel in this project.. so i have to pass in to the view the viewmodel containing a datetime property.
<%=Html.TextBox("DateOfBirth", Model.DateOfBirth)%><br />
thanks
Upvotes: 0
Views: 2148
Reputation: 156708
Just format your Model.DateOfBirth:
<%=Html.TextBox("DateOfBirth", Model.DateOfBirth.ToShortDateString())%>
Upvotes: 1