Flex: drag-select a range on the date chooser

Beats me why this is not implemented into Flex, it seems to me like a very basic/natural/user-friendly behavior that any date chooser should have.
I m talking about the ability to drag-select a range on the DateChooser.
That is: mouse down, drag to select a range of days, mouse up.

This component extends DateChooser to add a new property: dragSelect (true/false).
Notice that (obviously) ‘allowMultipleSelection’ must be set to true in order to use the drag-select feature.

Also in this demo you can see a custom date range validator with minimum and maximum allowed days.

Demo is here (right click for source)
Source is here

Advertisements

6 Responses to Flex: drag-select a range on the date chooser

  1. Nice little component.

    One comment – when you select the same days using ctrl-click the validator still says less than 3 days. The validator only seems to work when you drag select.

  2. shemesh says:

    Giles hi,
    yes, i have noticed some irregularity with the validtor.
    probably it should listen to some other event.

  3. Pingback: drag-select a range on the date chooser « 道道道

  4. Aaron Begley says:

    Nicely done.

    My only problem is that the range selection is limited to days in a single month. You can make a case that’s a necessary requirement. It’s hard to see how that affordance would work. (Which is probably why the feature suspiciously absent from the component.)

  5. oscar says:

    the source and demo files aren’t downloadable, can you do something?
    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: