Components Flex



    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
    
         
        import mx.events.CalendarLayoutChangeEvent; 
        private function useDate(eventObj:CalendarLayoutChangeEvent):void { 
          // Make sure selectedDate is not null. 
            if (eventObj.currentTarget.selectedDate == null) { 
                return; 
            } 
            //Access the Date object from the event object. 
            day.text=eventObj.currentTarget.selectedDate.getDay(); 
            date.text=eventObj.currentTarget.selectedDate.getDate(); 
            month.text=eventObj.currentTarget.selectedDate.getMonth() + 1; 
            year.text=eventObj.currentTarget.selectedDate.getFullYear(); 
            wholeDate.text= (eventObj.currentTarget.selectedDate.getMonth() + 1) + 
                "/" + (eventObj.currentTarget.selectedDate.getDate() + 
                "/" + eventObj.currentTarget.selectedDate.getFullYear()); 
        }