I have been experimenting with the DateChooser component in order to use it as a simple event calendar. It is fairly difficult to override the CalendarLayout methods, so I decided to approach the problem by simply iterating through the DateChooser's children and modifying the htmlText property for each UITextField that matches an event date.
The date Collection has properties for the event's date, label and return value and should be fairly simple to populate from a database or XML file:
public var
dateCollection:ArrayCollection = new ArrayCollection([
{ date:"12/4/2008", data:"party
value", label:"Party"},
{ date:"1/5/2009", data:"meeting
value", label:"Meeting"},
{ date:"12/15/2008", data:"holiday
value", label:"Holiday"},
{ date:"12/15/2008", data:"dinner
value", label:"Dinner"},
{ date:"12/15/2008", data:"bedtime
value", label:"Bedtime"}
]);
Right now I only have a few random date entries for December 2008 and
January 2009, so you may need to navigate to those months to see
anything.
This allows me to add links with HREF set to "event:returnvalue" so that the application can be allowed to respond to clicking on any particular date:
dayHTML += "<br><A href='event:" + eventArray[k].data + "'
TARGET=''>" + eventArray[k].label + "</A>";
Currently, it seems to take at least one click to set the focus on the DateChooser - so you may have to click the first entry twice to fire the TextEvent.LINK event.
This is an early concept, but it seems to work pretty well right now and my hopes are that someone might be able to use this as a starting point for building their own simple event calendars. Flash Enabled Blog also has a great post pointing to other excellent calendar solutions for Flex.
You can view the source for the application here: ExtendedDateChooser