Aspnetcore.docs: .Net Type DateTime correlates to input type="datetime-local"

Created on 10 Jul 2018  ·  3Comments  ·  Source: dotnet/AspNetCore.Docs

https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-2.1#the-input-tag-helper
In the table corelating .net type to input type it states
DateTime type=”datetime”

And it should state DateTime correlates to type="datetime-local"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

P0 P2

Most helpful comment

@StevenTCramer thanks, we'll address this in the next doc review. cc/ @dpaquette

All 3 comments

@StevenTCramer thanks, we'll address this in the next doc review. cc/ @dpaquette

@StevenTCramer There is no such thing as type="datetime-local".

cc/ @dpaquette

@Rick-Anderson There is such a thing: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local

and it is used by the Input Tag helper when binding to DateTime properties:
https://github.com/aspnet/AspNetCore/blob/321327f84b2b22dcff2e9beb06a9a64236c5cced/src/Mvc/src/Microsoft.AspNetCore.Mvc.TagHelpers/InputTagHelper.cs#L34

I think this should be re-opened. I agree with @StevenTCramer that the docs are not correct.

Was this page helpful?
0 / 5 - 0 ratings