Is there a way to localize input type="date" in HTML5

Posted by lambacck on Stack Overflow See other posts from Stack Overflow or by lambacck
Published on 2010-06-03T18:42:20Z Indexed on 2010/06/03 18:44 UTC
Read the original article Hit count: 208

Filed under:
|

I know that at the time of this writing only Opera supports a browser UI for

<input type="date" name="mydate">

and maybe my attempts to localize this field have been met with frustration because niceties like localization have not yet been included in their implementation, but I don't even see mention of it in the HTML5 spec. Is there a way that localization should be specified? Should I do lang="fr" on a parent element?

Some notes on the implementation of the site in question:

  • Localization (language) is explicitly picked by the user because they are managing data in multiple languages and it is not reasonable to expect that the user's browser chrome is in the language being viewed or that the browser is providing desired language request headers.
  • I want to be sure that if the page is rendered in French that the date picker provided by browser chrome shows options that make sense for French language.
  • The plan is to fall back to jQueryUI for browsers that do not support type="date", I will use the detection mechanism provided in Dive into HTML 5

© Stack Overflow or respective owner

Related posts about html5

Related posts about datepicker