Call JavaScript function to get the result
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)" width="175" height="180">
<mx:Script>
private function initializeHandler(event:Event):void {
var dates:Array = ExternalInterface.call("getDates");
calendar.disabledRanges = dates;
ExternalInterface.addCallback("setEnabled", setEnabled);
}
public function setEnabled(value:Boolean):void {
calendar.enabled = value;
}
</mx:Script>
<mx:DateChooser id="calendar" enabled="false" />
</mx:Application>
Related examples in the same category