Take the 2-minute tour ×  I'd like to configure the EditorFor
template for every datatime objects in any of my models.  I'm
getting this error:  \EditorTemplates\DateTime.cshtml(1): error
CS1973: 'System.Web.Mvc.HtmlHelper' has no applicable method
named 'TextBox' but appears to have an extension method by that
name. Extension methods cannot be dynamically dispatched.
Consider casting the dynamic arguments or calling the extension
method without the extension method syntax.  Here's the entire
code that's inside of the EditorTemplate called, DateTime.cshtml
places in the EditorTemplates folder.  Any ideas?  Here's what I
call in my View:  <div class="editor-label">
@Html.LabelFor(model => model.DateOfBirth) <div class="editor-
field">     @Html.EditorFor(model => model.DateOfBirth)
@Html.ValidationMessageFor(model => model.DateOfBirth)  And this
is the custom EditorTemplate I made:  @Html.TextBox("", Model,
new { @class = "date-selector" });   Basically, for every
datetime object in my models, I want to