I have the following code in my View:
@Html.EditorFor(model => model.DtCollectedLead, new { style="width:100px;" })
I have the following code in my ViewModel:
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy/MM/dd}")]
public DateTime? DtCollectedLead { get; set; }
What is happening is that the width does not adjust to 100px. I know I can use TextBoxFor bu then I cannot take advantage of the the DisplayFormat that I need for the date field. Is there any way to adjust the width for EditorFor?