Search code examples
cssactionscript-3flex3

AS3 hide textInput from DateField


is there a way to hide textInput from DateField in Action Script 3 ? show result with only the icon. with modifying the property textInputStyleName="textInputStyle" CSS :

.textInputStyle {
width : 0px ; //OR
display : none ;
} 

Solution

  • You can hide the TextInput of your DateField component using mx.core.mx_internal like this :

    var text_input:TextInput = date_field.mx_internal::getTextInput();
        text_input.visible = false;
    

    You can also use a button to show a DateChooser component instead of a DateField.

    Hope that can help.