Try the code below. If you click on a date, then click on the same 
date, this throws an error. Am I doing something wrong or is this a 
bug?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute">
        <mx:DateChooser x="10" y="10" id="schCalendar" change="setDate
()"/>   
        <mx:Script>
                <![CDATA[
                        public function setDate():void {
                        if (schCalendar.selectedDate.day == 0) {
                                day.text="Sunday";
                        }
                        if (schCalendar.selectedDate.day == 1) {
                                day.text="Monday";
                        }               
                        if (schCalendar.selectedDate.day == 2) {
                                day.text="Tuesday";
                        }
                        if (schCalendar.selectedDate.day == 3) {
                                day.text="Wednesday";
                        }                                       
                
                        if (schCalendar.selectedDate.day == 4) {
                                day.text="Thursday";
                        }
                        if (schCalendar.selectedDate.day == 5) {
                                day.text="Friday";
                        }
                        if (schCalendar.selectedDate.day == 6) {
                                day.text="Saturday";
                        }
                        }                                       
                
                ]]>
        </mx:Script>
        <mx:Text x="192" y="51" id="day" width="101" height="20"/>
</mx:Application>


Reply via email to