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
\Views\Shared\EditorTemplates\Date.cshtml
but this file will be ignored.
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.
As long as the type is date the HTML5 selector will be displayed together with the datepicker, which is not usable.
I want to Change the type in the template and the class. I create a Date.cshtml:
@model DateTime
Test Date Box
@Html.TextBox("", Model.Date, new
{
@class = "datePicker",
@readonly = "readonly"
}))
and put this in \Pages\Shared\EditorTemplates but it didn't work. Even in \Views\Shared\EditorTemplates it did not work.
Does anyone have an idea?
Best regards
David