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

3 Responses to “drag-select a range on the date chooser”

  1. Giles Roadnight Says:

    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. drag-select a range on the date chooser « 道道道 Says:

    [...] drag-select a range on the date chooser http://shemesh.wordpress.com/2008/03/22/drag-select-a-range-on-the-date-chooser/ [...]

Leave a Reply