[whatwg] datalist @exclusive

Diogo Resende dresende at thinkdigital.pt
Fri Mar 11 02:50:27 PST 2011

 On Thu, 10 Mar 2011 21:28:44 -0500, Aryeh Gregor wrote:
> 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)>

 You meant 0-5 and not 0-59 :P.

> 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.  :)

 I love regex but I agree with you that for that pattern is seems pretty 
 obvious, but for others it's not that simple. And no, my weekend 
 question cannot be done with regex (at least in a short way :P). Maybe 2 
 methods for enabling/disabling days in the input would be better for 
 more complex scenarios.

More information about the whatwg mailing list