Need help in customization of Flex DateField

45 views
Skip to first unread message

AshokFx

unread,
Jul 26, 2011, 4:42:32 PM7/26/11
to flex_...@googlegroups.com
Hi all,

I need to customize the flex DateField's Chooser to have "next month button" just after the month name i.e.
"< (prev) +  July +  > (next) 2011 "

Note this is the header of date chooser. Thanks

Regards
Ashok Kumar

vicky

unread,
Jul 26, 2011, 5:11:07 PM7/26/11
to Flex India Community
An idea on how you can achieve that....

package components
{
import mx.controls.DateChooser;
import mx.core.mx_internal;

use namespace mx_internal;

public class CustomDateChooser extends DateChooser
{
private static const PADDING:int = 3;

public function CustomDateChooser()
{
super();
}

override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);

var yearDisplayTextXPos:Number =
mx_internal::yearDisplay.x;
var fwdButtonWidth:Number =
mx_internal::fwdMonthButton.width;

mx_internal::fwdMonthButton.x = yearDisplayTextXPos;
mx_internal::yearDisplay.x = yearDisplayTextXPos +
fwdButtonWidth + PADDING;
}
}
}

Build on this concept, you should be able to do it easily :-)

ashok kumar

unread,
Jul 27, 2011, 1:58:43 PM7/27/11
to flex_...@googlegroups.com
Thanks a lot !!! i already achieved it with same below technic. Anyway thanks a lot buddy for putting effort :).


--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.


Reply all
Reply to author
Forward
0 new messages