W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] datalist @exclusive

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 9 Mar 2011 16:28:00 +0200
Message-ID: <A909BF0FB44D4731B3C3D16936CB2815@JukanPC>
Christoph P?per wrote:

> Diogo Resende:
>>
>> I was thinking.. what about allowing big time spans, like: from
>> April 1st to June 30th? Giving that the date has "-" as date element
>> separators we could not use YYYY1-MM1-DD1-YYYY2-MM2-DD2.
>
> ISO 8601 specifies how to code time intervals (and durations) in
> several ways: start and end date/time, start date/time and duration,
> duration and end date/time, or duration only ? the separtor alwas is
> a forward slash ?/?, replacable by a double hyphen ?--? if necessary.
>
> If HTML was to support this it should do so in compatibility with ISO
> 8601.

Setting a date range limitation is already possible according to the current 
version of HTML5 drafts, just not as an ISO 8601 range notation (which 
nobody uses outside laboratories and which requires parsing the limits) but 
with min and max attributes, e.g.
<input type="date" min="2011-04-01" max="2011-06-30">

Ref.: 
http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state

This is supported both by Opera (in its calendar widget) and by Chrome (in 
its somewhat odd widget that lets you scroll through dates, one date at a 
time, but I think that's meant to be allowed as conforming).

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Wednesday, 9 March 2011 06:28:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC