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

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

From: Andrew Kujtan <akujtan@evertz.com>
Date: Wed, 30 Jan 2013 16:20:44 -0500
Message-ID: <13B290A06827324E9ADB71AA314F818901DF426C@otis.burlington.evertz.tv>
To: <whatwg@lists.whatwg.org>
> Hi,
> 
> In my war against useless input types, I had a look at 'month' and
> 'week' and I am wondering what was the rationale behind having them in
> the HTML specifications.
> 
> Regarding 'month', I mostly don't understand the use case. I can't find
> any situation where I am asked to input a { month, year } information.

Any age restricted site has this for 'age verification'.

> Given that the element is pretty trivial to implement by authors (this
> is basically two <select> or a select and a <input type='number'>), the
> only advantage I see to have this element in the specifications is to
> have a native UI on mobile.
> I am wondering if use cases were taken into account when this was added
> to the specs and if vendors that implement this element can report good
> adoption if any.
> 
> I can see niche use cases for 'week' but I do not think it is easy to
> come up with a good UI for this, especially on mobile (there is no
> native UI on mobile AFAIK). On desktop, Chrome's UI is terrible but the
> Opera one is decent.
> This type would solve the use cases of people trying to find a week to
> meet. Typically, W3C F2F's. However, this is a niche use cases. Most of
> the times, when people speak in 'week', they don't really mean from
> Monday to Sunday. For example, if someone takes a vacation "the first
> week of February", he/she will not book its hotel for the week 5 or 6
> but from a specific day to another specific day.
> 
> Generally speaking, I believe both those types lack use cases and I
> wonder if the HTML specifications are not defining a solution for
> something that is still looking for its problem.
> In other words, are authors writing their own 'month' and 'week' widget
> at the moment? If they are, would there life be easier with those input
> types?
> 
> Thanks,
> --
> Mounir
Received on Wednesday, 30 January 2013 21:21:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 21:21:11 GMT