I have generated Controller and View using add scaffolding in Visual Studio 2017, but the datetime input field need to enter the date time manually instead of datetime picker. I have tried several ways but still not able to implement datetime picker.
[DataType(DataType.DateTime)]
public DateTime EnrollmentDate { get; set; }
The datetime can be selected when I added
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
but I need hour and minutes as well but this is not working.
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd-hh-mm-tt}", ApplyFormatInEditMode = true)]