W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Please consider adding a couple more datetime <input> types - type="year" and type="month-day"

From: Kit Grose <kit@iqmultimedia.com.au>
Date: Mon, 9 Aug 2010 01:11:52 +0000
Message-ID: <19089563-AC51-4244-B4FE-E98E5D8E96CD@iqmultimedia.com.au>
The field being four digits long doesn't restrict its contents to four digits only. I suppose you do raise an interesting concern; should the "year" field also permit the entry of BC/AD? If so, that might invalidate the ability to use a number field; you'd need to use a validation pattern on a standard text field.

?Kit

On 09/08/2010, at 10:46 AM, Andy Mabbett wrote:

> 
> On Mon, August 9, 2010 00:44, Kit Grose wrote:
>> How is a "year" input any different from a four-digit input type="number"
>> field?
> 
> Years can be more of fewer than four digits. Julius Caesar was born in 100
> BC, for instance, while Manius Acilius Glabrio was consul in 91 AD.
> 
> -- 
> Andy Mabbett
> @pigsonthewing
> http://pigsonthewing.org.uk
> 
Received on Sunday, 8 August 2010 18:11:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:59 UTC