[whatwg] datalist @exclusive

Aryeh Gregor Simetrical+w3c at gmail.com
Thu Mar 10 18:28:44 PST 2011


On Wed, Mar 9, 2011 at 5:08 PM, Diogo Resende <dresende at thinkdigital.pt> wrote:
> That is perfect for 1 date scope. What if I have a meeting to schedule in a
> month (eg. March) and (according to other meeting attendees) the meeting can
> only happen from 10-15, 19, 20-28 and 30. Do I have to make a data-list with
> every possible day?

<input type=date pattern=2011-03-(1[0-59]|2[0-8]|30)>

A good UI implementation could at least check the pattern against
every day currently displayed in the date-picker and gray out any that
don't match it.  I don't know how feasible it would be to gray out the
next/previous month buttons or anything just based on patterns,
though.  Also, I'm not sure we really want to force people to use
regex for this . . .

> What if I would like to set a future event that cannot
> happen on weekends?

That might be possible with regex in theory, but I really don't want
to see it.  :)



More information about the whatwg mailing list