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: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(new section See Also - time element, related proposals)
(couple more input type month-day use-cases)
Line 42: Line 42:
* year - see the [[Time_element#year_only|time element year only use cases]]
* year - see the [[Time_element#year_only|time element year only use cases]]
* month-day - see [[Time_element#month_day_only|time element month day only use cases]]
* month-day - see [[Time_element#month_day_only|time element month day only use cases]]
** inputting a birthday without birth year
** entering custom annual holidays


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]].
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]].

Revision as of 23:18, 8 August 2010

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).
  • +1 Andy Mabbett - Per the above, and examples/ use cases on time element.
  • ...

See Also

  • time - the time element, related proposals.