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

[whatwg] datalist @exclusive

From: Diogo Resende <dresende@thinkdigital.pt>
Date: Fri, 11 Mar 2011 11:50:27 +0100
Message-ID: <31d1ac0f150ecd366ff42a00690cf219@thinkdigital.pt>

 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.
Received on Friday, 11 March 2011 02:50:27 UTC

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