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

[whatwg] datalist @exclusive

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 10 Mar 2011 21:28:44 -0500
Message-ID: <AANLkTi=Ky9xuWxm8ixFiVVzTzFrQFvCVhS9nd5Rm7ema@mail.gmail.com>
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.  :)
Received on Thursday, 10 March 2011 18:28:44 UTC

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