<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/07/24/toggling-year-navigation-on-a-datechooser-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="top"
        backgroundColor="white"
        initialize="init();">

    <mx:Script>
        <![CDATA[
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.controls.CheckBox;
            import mx.controls.DateChooser;

            private var checkBox:CheckBox;
            private var dateChooser:DateChooser;

            private function init():void {
                checkBox = new CheckBox();
                checkBox.addEventListener(Event.CHANGE, checkBox_change);

                var formItem:FormItem = new FormItem();
                formItem.label = "yearNavigationEnabled:";
                formItem.addChild(checkBox);

                var form:Form = new Form();
                form.styleName = "plain";
                form.addChild(formItem);

                var appControlBar:ApplicationControlBar;
                appControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(form);
                Application.application.addChildAt(appControlBar, 0);

                dateChooser = new DateChooser();
                addChild(dateChooser);
            }

            private function checkBox_change(evt:Event):void {
                dateChooser.yearNavigationEnabled = checkBox.selected;
            }
        ]]>
    </mx:Script>

</mx:Application>