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

Brett Zamir brettz9 at yahoo.com
Sun Aug 8 18:25:30 PDT 2010


  How about a pull-down for Wikipedia which lets you choose the year or 
period? Or a charting application which looks at trends in history.

While some uses may be more common than others, I personally favor going 
the extra kilometre to allow full expressiveness for whatever ranges are 
allowed.

Brett

On 8/9/2010 9:19 AM, Ben Schwarz wrote:
> While creating an input that works for every use case you can think of 
> sounds like a good idea, I'd like to question weather a user would 
> ever /enter a date/ that would require the inclusion of BC/AD.
>
> I'm certain that there is a requirement to markup such text, but as 
> for /entry/ I'm strongly of the opinion that you're over cooking this.
>
> On Mon, Aug 9, 2010 at 11:11 AM, Kit Grose <kit at iqmultimedia.com.au 
> <mailto:kit at iqmultimedia.com.au>> wrote:
>
>     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
>     >
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100809/58f72792/attachment-0002.htm>


More information about the whatwg mailing list