-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Proposal: to add the attribute format for input times #4523
Comments
https://html.spec.whatwg.org/#input-impl-notes already recommends implementations using the language specified by the web developer, but also, this is ultimately up to implementations as they get to decide what the UX is they want to present to their users. |
Hi @annevk thanks for your answer and I partially agree, but if there is no any attribute, I think vendors can skip it as the case of Chromium project that no reply and the point has been opened for years and might not change in the near future. |
To be clear, the attribute would be |
@annevk It would be very useful that |
@kidwm |
https://developer.mozilla.org/ja/docs/Web/HTML/Element/input/date Just want the date picker UI could also be localised like this: |
@kidwb Thanks! I think my response might not have been clear. I agree and want very much for browsers to localize native controls to match the page experience my HTML page is trying to create. The question is, how, as a page author, can I get that experience? Here are some examples of what that might look like. In this one, there is an additional attribute <input type="date" lang="ja" locale="ja-JP-u-ca-japanese"> In this one, I just use <input type="date" lang="ja-JP-u-ca-japanese"> This one shows inheritance (in this case from the <p lang="ja-JP-u-ca-japanese">何日がご希望ですか?<input type="date"></p>
<p lang="ja-JP-u-ca-japanese">何日がご希望ですか?<input type="date" lang="en-US"></p>
<p lang="ja-JP-u-ca-japanese">何日がご希望ですか?<input type="date" lang=""></p> Inheritance would allow all of the inputs (not just <html lang="ja-JP-u-ca-japanese">
...
<input type="date">
... |
I have seen multiple questions of the issue of 12/24 format in the forums for input types, some browsers recognized the configuration, others just totally ignore it and it doesn't matter what you do, it's complex to deal forcing developers to use 3rd party plugins because the situation makes unusable in many cases the input time control, for example:
I tried building a small app with an input type in Android:
https://stackoverflow.com/questions/55621090/lang-attribute-ignored-in-android-webview
But it didn't work because in Poland there is 24h format and not 12, but because my emulators use en-US, it didn't matter, yes, I could switch the regional settings, but it's a huge work, it will be good to have a mandatory option or at least make a proposal that the lang should be respected to simplify the work and promote the usage of these controls regularly among developers, avoiding 3rd party solutions or our own plugins.
Thank you in advance for your support.
P.S.
There is even an issue related since 6 years ago in Chromium that proves how important is to have an alternative to encourage Browser vendors to provide an option:
https://bugs.chromium.org/p/chromium/issues/detail?id=263320
The text was updated successfully, but these errors were encountered: