2

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.

ronalchn
  • 12,225
  • 10
  • 51
  • 61
  • I'm unclear what you're asking for help on. A screenshot or two may help. – JeffryHouser Sep 03 '12 at 21:20
  • 1
    @Flextras this is my first post. Image uploading require 10 reputation :( I have the screenshot aswell, however, I am unable to post. A detailed description: If you run the code you will find the DateChooser with cell border that means every date has border. Like a DataGrid row-column. There is a wired behavior, always it displays one vertical and another horizontal border which are bold than other. Please Click on Favorite ICON so that I can earn at least 10 reputation and can POST the IMAGE. – Soumen Choudhury Sep 04 '12 at 09:56
  • You may consider providing a runnable code sample. – JeffryHouser Sep 04 '12 at 12:24
  • @Flextras I have updated the code for your reference which compiles well in Adobe Flex SDK3.2 – Soumen Choudhury Sep 04 '12 at 14:38
  • 3.2? I'm not sure if I still have that version around; but +1 for providing a runnable sample. – JeffryHouser Sep 04 '12 at 14:48
  • @Flextras I have uploaded the image. Help would be appreciated. – Soumen Choudhury Sep 04 '12 at 14:54
  • Probably understood the root cause... will invest some time in it and update here at day end. :) – Soumen Choudhury Sep 07 '12 at 05:57

1 Answers1

1

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