[whatwg] Why do we have <input type='month'> and <input type='week'>?
Mounir Lamouri
mounir at lamouri.fr
Wed Jan 30 12:55:29 PST 2013
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.
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
More information about the whatwg
mailing list