Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attributes to control date display #29

Open
bkline opened this issue Nov 14, 2024 · 0 comments
Open

Add attributes to control date display #29

bkline opened this issue Nov 14, 2024 · 0 comments

Comments

@bkline
Copy link

bkline commented Nov 14, 2024

It would be helpful if the standard supported attributes to tell the browser which format to use for display of dates. In the absence of such attributes, browsers use whatever locale information is available to for showing the date, making it impossible for developers of web pages to assume that the display will be consistent across all browsers, and thus making it more difficult to provide simple, clear documentation of those web pages. I have customers who would like dates to be displayed using the standard ISO format, to eliminate any possible confusion or ambiguity about which portion of the displayed value represents the month, and which portion represents the day of the month, but standard HTML markup doesn't support that. Introduction of sequence and separator attributes (possibly with different names to anticipate naming conflicts) would make it possible to do what our customers want without relying on convoluted JavaScript code. For example:

<input type="date" sequence="ymd" separator="-">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant