Components Flex


    
        
            
        
        
            
        
        
            
        
    

    
        
            import mx.events.CalendarLayoutChangeEvent;
            private function update(evt:CalendarLayoutChangeEvent):void {
                var MILLISECONDS:int = 1000;
                var SECONDS:int = 60;
                var MINUTES:int = 60;
                var HOURS:int = 24;
                var diff:Number = endDate.selectedDate.getTime() - startDate.selectedDate.getTime();
                var days:int = int(diff/(MILLISECONDS*SECONDS*MINUTES*HOURS));
                display.text = days.toString();
            }