Hello.
I have an Array of days. I want those days to have a different background-color in the DateChooser component, say red.
How can I do that please?
Hello.
I have an Array of days. I want those days to have a different background-color in the DateChooser component, say red.
How can I do that please?
You have to use disabledRanges and disabledColor. Here is an example on "Flex examples".
The DateChooser isn't that easy to customise!
Something close to this will work, though you'll need to tweak it somewhat to suit what you want to do.
public class FancyDateChooser extends DateChooser {
public var fancyStyleName : String;
public var dayToMakeFancy : String;
protected override createChildren() : void {
super.createChildren();
var dateGrid : UIComponent = mx_internal::dateGrid;
for ( var i: int = 0; i < dateGrid.numChidren; i++ ) {
if ( ( dateGrid.getChildAt( i ) as IUITextField ).text == dayToMakeFancy ) {
dateGrid.getChildAt( i ).styleName = fancyStyleName;
}
}
}
}