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

Charles McCathie Nevile chaals at yandex-team.ru
Thu Jan 31 04:37:58 PST 2013

On Thu, 31 Jan 2013 12:40:50 +0100, Anne van Kesteren <annevk at annevk.nl>  

> On Wed, Jan 30, 2013 at 9:55 PM, Mounir Lamouri <mounir at lamouri.fr>  
> wrote:
>> 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.
> Credit cards.

This is the most obvious common use case. If the world keeps using  
non-gregorian calendars for significant things (e.g. Ramadan) and we  
evolve to support those, there are further use cases.

>> This type would solve the use cases of people trying to find a week to
>> meet.
> I think it was for tax forms, though I have not encountered one myself.

Calendar control widgets. All the calendar apps I have used offer "week at  
a glance" views, and most of the offer "month-at-a-glance" too. Selecting  
the relevant week or month is one of the most basic controls.

Curricula for courses are often described in terms of weeks.

Various other things too. Weeks are pretty clearly wired into the way we  
work, and are *roughly* aligned across most of the world - probably more  
so than months or years.

There are many countries where people talk about "week 27" as a normal  
expression of time. I find it unnatural. It is a widespread but far from  
universal use case, that I think it is reasonable to support.



Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
       chaals at yandex-team.ru         Find more at http://yandex.com

More information about the whatwg mailing list