A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Input element

From WHATWG Wiki
Revision as of 02:31, 6 August 2010 by Tantek (talk | contribs) (toc)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This article is a stub. You can help the whatwg.org wiki by expanding it.

Research, data, use cases, issues, and enhancements related to the HTML5 input element.

new date time inputs

The current new date time inputs cover a number of interesting and broad use-cases of various levels of granularity for absolute date and time input types:

* month          (specific year, month)
* week           (specific year, week (implied month(s)))
* date           (specific year, month, day)
* datetime       (specific year, month, day, time)
* datetime-local (specific year, month, day, time, timezone)

As well as one floating time input:

* time           (specific time, but no specific day, month or year)

This set is missing a few date time inputs that would make sense in such a more complete collection of granularity and floating (non-absolute) date time inputs:

* year      NEW: (specific year)
* month          (specific year, month)
* week           (specific year, week (implied month(s)))
* date           (specific year, month, day)
* datetime       (specific year, month, day, time)
* datetime-local (specific year, month, day, time, timezone)

and

* month-day NEW: (specific month, day)
* time           (specific time, but no specific day, month or year)

Use-cases:

The use-cases for each of these new inputs are documented in proposals for allowing the respective levels of granularity/floating date/time support in the time element.

Opinions / discussion:

  • +1 Tantek - any implementer that is going to the trouble of properly implementing the existing 6 new date time inputs will find it fairly easy to implement two additional variants, and this more complete model of date and time inputs will be easier to remember for web authors (fewer exceptions to remember).
  • ...