W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Please consider adding a couple more datetime <input> types - type="year" and type="month-day"

From: Ryosuke Niwa <ryosuke.niwa@gmail.com>
Date: Tue, 10 Aug 2010 13:59:58 -0700
Message-ID: <AANLkTimo+m5ZaSf1gbfaWLDkQKA1nCkmkSibrDFpHudr@mail.gmail.com>
2010/8/9 Ian Fette (????????) <ifette at google.com>

> I don't understand why I would need an <input type=year> to get this right
> though. If the bank wants something in ?? it can just let the user type in
> 1985 and convert that via JS to ??60?, no? If anything, having some sort of
> picker seems like it would be more complicated.

The problem is that it can't do the inserve of that.  What if the user
wanted to type in "??60?" but server only accepts 1985?  We want some UI for
accepting "??60?" and automatically convert it to 1985 to submit.  But to
implement that, UA needs to know that certain text field is accepting year,
not some random digits.

I really don't know if it's worth spending time on something that is such a
> minor use case, and can frankly be handled fine without a dedicated input
> type.
> And niwa-san, on every document I've ever filled out for the Japanese
> government, I've always written 1985? instead of  ??60? and it's yet to
> cause me any problems ;-) I do understand that there are some sites that
> want it written in the traditional form, but these seem to be precious few
> and far between, and frankly are not the sites I would expect to find HTML5
> form input elements on anyways if the US government is any indication of
> moving to new standards...

But there are users who don't know how to convert from "??xx?" to year 19xx
(like my parents and grandparents who has to spend at least half a minute
recalling their birth years in Gregorian calendar), and only remember their
birth years in ??xx.  Some people even buy a conversion table and keep it in
their wallet just so that they can convert between two systems.  Forcing
them to remember their birth years in 19xx isn't user-friendly and simply a
poor UI localization.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100810/fe822a36/attachment.htm>
Received on Tuesday, 10 August 2010 13:59:58 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC