DateChooser is behaving strangly

Posted by Tam on Stack Overflow See other posts from Stack Overflow or by Tam
Published on 2010-03-18T03:31:05Z Indexed on 2010/03/18 3:41 UTC
Read the original article Hit count: 478

Filed under:

Hi,

I'm writing a Flex application and I came accross what I think is a weird problem.

I want to create a text box and a DateChooser as the datefield didn't do what I wanted and it's Halo so I can't skin it easily. I want the DateChooser to show when I click on the text input. Here is except from my code:

        <s:TextInput id="wholeDate" width="100"  
                     mouseOver="stopChangeToNormal();"
                     paddingRight="10"
                     click="date1.visible = true"
                     focusOut="date1.visible = false"/>
        <s:Button label="Go" width="70" />
    </s:Panel>

    <mx:DateChooser id="date1" 
                    visible = "false"
                    change="useDate(event);" 
                    mouseOver="changeToNormalState = false;" 
                    y="{wholeDate.y + buttonsGroup.y + 20}"
                    x="{wholeDate.x + buttonsGroup.x - 175 }" />    

The weird thing is that it work as I wanted if I make it visible = "true" to start but if I have it visible="false" it doesn't work! it shows by the date I select doesn't show in the box as it does if I have it as visible="true" but I don't want it to be visible initially.

Any ideas?

Thanks,

Tam

© Stack Overflow or respective owner

Related posts about flex