Today I feel really frustrated , but it seems a relatively easy thing …show a date picker is very hard to achieve with MVC 5 i must be missing a trick! It cant be as hard as I am making it.
I have an MVC 5 Razor view, created automatically ( I am using VS 2015) that displays a list of fields of which several are dates. How do I also enable a date picker to pop up, one that works with Chrome and IE.
My div tag in my View looks like the attached code snippet, does anyone have any ideas what I should do or where I should turn to for help.
<div class="form-group">
@Html.LabelFor(model => model.StartDate, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.StartDate, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.StartDate, "", new { @class = "text-danger" })
</div>
</div>