[whatwg] datalist @exclusive [was: Please reconsider: Set restricted palette for input type=color]

Markus Ernst derernst at gmx.ch
Wed Mar 9 00:53:59 PST 2011

Am 09.03.2011 06:51 schrieb Jukka K. Korpela:
> Jonas Sicking wrote:
>> I'm having a little bit hard of a time figuring out what a good UI
>> would look like in the general case. I.e. what should the UI look like
>> for
>> <input type="date" id="date" name="date"
>> value="2011-04-01" list="datelist" exclusive>
>> <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">
>> <option value="2012-06-06" label="National Day of Sweden">
>> </datalist>
>> Do you allow flipping between only the months which have any available
>> dates in them using the next/previous month buttons in the date
>> picker?
> That would be the idea, I guess, but there are two alternatives
> regarding months that have no applicable days: either skip them or gray
> them out. So in your example, when in April 2011, "Next month" button
> could take you to June 2012, or it might take you to to May 2011 with
> all days grayed out

It should definitely be the latter, as "Next month" taking you to 
somewhere else than the next month is confusing. IIRC I have seen JS 
date pickers behave like that, but I am sorry I don't remember where it was.

Even in a rare use case where several months are totally grayed out, the 
user needs the information that no dates are available there - else 
(s)he will assume a technical error or somewhat.

More information about the whatwg mailing list