Flex mx:DateChooser bold cell border issue

642 views Asked by At

enter image description here

    <mx:Script>
        <![CDATA[
            import mx.core.UITextField;

            private function setDayStyles():void{
                var dateField  :UITextField;
                var colIndex : int;
                var rowIndex : int;
                dateChooser.mx_internal::dateGrid.height = 148;
                dateChooser.mx_internal::dateGrid.width = 176;

                //Change background for weekday name row
                for(colIndex = 0; colIndex < 7; colIndex++){
                    dateField = dateChooser.mx_internal::dateGrid.mx_internal::dayBlocksArray[colIndex][0] as UITextField;
                    dateField.background = true;
                    dateField.border = true;
                    dateField.backgroundColor = 0xCCCCCC;
                    dateField.borderColor = 0xCCCCCC;

                } 
                //set border for day labels
                for(rowIndex = 1; rowIndex < 7; rowIndex++){
                    for(colIndex = 0;  colIndex < 7; colIndex++){
                        dateField = dateChooser.mx_internal::dateGrid.mx_internal::dayBlocksArray[colIndex][rowIndex] as UITextField;
                        dateField.border = true;
                        dateField.borderColor = 0xCCCCCC;
                    }
                } 
            }

        ]]>
    </mx:Script>

    <mx:HBox  horizontalGap="15" styleName="padding10Style">
        <mx:DateChooser id="dateChooser" initialize="setDayStyles()"/>
    </mx:HBox>

</mx:Application>

I am facing the of bold border problem. Below is the code snipet for your reference:

I have tried to set the bordersides dynamically as this is UITextFiled , this is not possible.

1

There are 1 answers

0
Soumen Choudhury On BEST ANSWER

Finally got the solution... huh!!!
Actually the behavior is wired... :(
Initially I thought the problem is because of overlapping of border... then I suddenly realize the number of bold borders are not fixed they are different on different machine... Babun's (my friend... thanks to him)observation is also the same...
Its basically rendering issue of DateChooser... the border width automatically adjusted according to height and width....
Played with width and height and got the expected result. Modified width and height is:

dateChooser.mx_internal::dateGrid.height = 147;
dateChooser.mx_internal::dateGrid.width = 175;

bold borders are no more

Pain is over :)

@Flextras thanks for your time man

Keep playing -S