the default value for "selectedDate" is null you can initialize it in the creation Complete event:
date1.selectedDate = new Date();
and selectedDate will change after you click a valid day , i.e after click event not mouse over event.
Yeah, I do know about the null value of the selectedDate when you use it as a click event.
The problem is, even if I tried to mouseOver and have it echo back the name of the event is never the name of the date, but looks like the position name of the object array. I have attached the code below, and I get the event.target.name.toString output something like the following:
If I try to have it trace the line trace("On Over: " + event.target.selectedDate.getDay()); I get the error in the following when I try to debug it:
ReferenceError: Error #1069: Property selectedDate not found on mx.core.UITextField and there is no default value.
Do I have to define the dates' position one by one? Or, is there something a little easier?
Thanks for your help.
Here is my updated code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" themeColor="#0EFF02">
private function useDate2(event:MouseEvent):void
if(event.target is UITextField)
<mx:Canvas id="test" x="118" y="136" width="443" height="173" >
Looks like I did figure out how to get the mouseOver to work in this situation, but I could not get it to pull the entire date string. Right now, this snippet shows that I could extract the day of the week, month, year and the date depending on where I roll my mouse over to.
Is it possible to get the entire dateString to display in this case when one mouseOvers?
Thanks in advance.
It's been a while since you posted this, I'm not sure if you ever figured this out. I am trying to do the
same thing, but haven't figured it out yet. did you figure it out?