In my opinion, I have the following:
@Html.TextBoxFor(model => model.EndDate)
When the code and model are created, I see that it sets the default date instead of zero for the field, which is defined as follows:
public DateTime EndDate { get; set; }
In my opinion, I see the following:
{1/1/0001 12:00:00 AM}
Is there a way so that I can show / return an empty string if the field is not already set by the value in my code. Here it just defaults to the value above when I create the view and do not set this field.
source share