W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2013

Re: [whatwg] Why do we have <input type='month'> and <input type='week'>?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 12 Feb 2013 09:26:16 -0800
Message-ID: <CAAWBYDCQppyNtUmr-xAt0Tn9Ydbd1bE6WYQTVSfThvZCPGJoVw@mail.gmail.com>
To: Mounir Lamouri <mounir@lamouri.fr>
Cc: WHATWG <whatwg@lists.whatwg.org>
On Tue, Feb 12, 2013 at 9:20 AM, Mounir Lamouri <mounir@lamouri.fr> wrote:
> On 01/02/13 15:39, Glenn Maynard wrote:
>> FYI, I would find this annoying.  CC expiry entry forms are typically
>> select boxes containing 01-12.  The text lines up with what's on my credit
>> card, so I don't have to translate "07" to "July" in my head when entering
>> it off of my card.  Any month picker for credit card expiry dates should
>> always have month numbers (of course, names *in addition* to numbers are
>> fine, though probably pointless).
>
> That's exactly why I think the use case is weak: it is easy to implement
> a month picker:
> <select name='month'><!--fill with option for each
> month--></select><select name='year'><!-- fill with option for each year
> you want to show --></select>
>
> Given how easy it is, authors might quickly end up expecting specific
> behaviour that the UAs do not provide. For example, Having "01 -
> January" or "January - 01" or even "01" instead of "January". They could
> want the year to show up as 2 digits or 1 digit, as a textfield, a
> <select> or an <input type='number'> with a min and a max.
> Anyway, I still believe that the pros of <input type='month'> are quite
> low but in another hand, it shouldn't cost too much for UA to implement
> it if or date-time-related types are already implemented and it provides
> a real benefit on Mobile.

The fact that authors today have a random assortment of displays for
the exact same feature (credit card expirys) is something that would
be great to fix, not bemoan as a loss to the world. ^_^

~TJ
Received on Tuesday, 12 February 2013 17:27:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:19 UTC