[whatwg] datalist @exclusive [was: Please reconsider: Set restricted palette for input type=color]
Markus Ernst
derernst at gmx.ch
Wed Mar 9 06:32:52 PST 2011
Am 09.03.2011 12:19 schrieb Diogo Resende:
> On Tue, 8 Mar 2011 16:51:25 -0800, Jonas Sicking wrote:
>> On Tue, Mar 8, 2011 at 10:46 AM, Markus Ernst <derernst at gmx.ch> wrote:
>>> Am 08.03.2011 19:02 schrieb Anne van Kesteren:
>>>>
>>>> On Tue, 08 Mar 2011 12:26:56 +0100, Jukka K. Korpela
>>>> <jkorpela at cs.tut.fi> wrote:
>>>>>
>>>>> For example, consider a date picker. Quite often, whether trying to
>>>>> make dates or selling flights, there is a known set of
>>>>> (non-consecutive) days that are possible, so we would like to
>>>>> write, say,
>>>>>
>>>>> <input type="date" id="date" name="date"
>>>>> value="2011-04-01" list="datelist">
>>>>> <datalist id="datelist">
>>>>> <option value="2011-04-01" label="April 1st">
>>>>> <option value="2011-04-08" label="April 8th">
>>>>> <option value="2011-04-09" label="April 9th">
>>>>> </datalist>
>>
>> (...)
>>
>> / Jonas
>
> 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. Couldn't this
> be useful? Even more common might the usecase where a date must be from
> some date onward (or until some date). How is this addressed?
I assume that this is only a problem if you need to allow/disallow
several periods in the same date picker. For one single period, or
allowing dates only from or up to some date, you can use "min" and "max"
attributes in the input type=date element.
More information about the whatwg
mailing list