Flex: drag-select a range on the date chooser
March 22, 2008 6 Comments
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
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.
Giles hi,
yes, i have noticed some irregularity with the validtor.
probably it should listen to some other event.
Pingback: drag-select a range on the date chooser « 道道道
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.)
the source and demo files aren’t downloadable, can you do something?
thanks
you can download now.