I've been trying to get this to work for some time, but for some reason I can never seem to get the range of dates from the datechooser.
My Date Chooser looks like this:
<mx:FormItem label="Event Date(s)" fontWeight="bold">
<mx:DateChooser id="edate" change="getDates(event)" width="263" allowMultipleSelection="true" allowDisjointSelection="false" height="151" enabled="true"/>
After that, I've tried everything I could think of to get the selected range. My question is, what goes in 'getDates(event)' to get the range of dates?
Thanks for the help!
private function getDates(evt:Event):void
//evt.currentTarget holds a reference to the dateChooser component
//dataChooser has a selectedRanges property which is an Array of objects. Each object
//has a rangeStart and rangeEnd property which are date objects.
//since you disabled disjoined selections, there can only be one range which is the first object in your array
var ranges:Object = evt.currentTarget.selectedRanges;
Thanks! This worked perfectly.