title: Override Date field template with razor pages and ASP.NET Core 2.1
body: <p>I want to override the template for the date field input. I am using Visual Studio 2017, ASP.NET Core 2.1 and Razor Pages. I read on different pages to put the template in</p>
  
  <p>\Views\Shared\EditorTemplates\Date.cshtml</p>
  
  <p>but this file will be ignored. </p>
  
  <p>At the Moment the Standard template inserts a  field, that results in HTML5 Standard date selector which is terrible in Edge, especially for birthdates. I want to replace it with the jquery datepicker. </p>
  
  <p>As long as the type is date the HTML5 selector will be displayed together with the datepicker, which is not usable.</p>
  
  <p>I want to Change the type in the template and the class. I create a Date.cshtml:</p>
  
  <pre><code> @model  DateTime
     Test Date Box
     @Html.TextBox("", Model.Date, new
         {
             @class = "datePicker",
             @readonly = "readonly"
         }))
  </code></pre>
  
  <p>and put this in \Pages\Shared\EditorTemplates but it didn't work. Even in \Views\Shared\EditorTemplates it did not work.</p>
  
  <p>Does anyone have an idea?</p>
  
  <p>Best regards</p>
  
  <p>David</p>