flex学习笔记-日历选择与显示

Posted on 2013-07-24 10:25  诸葛小北  阅读(400)  评论(0编辑  收藏  举报
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;
            public function showMsg(msg:String):void
            {
             mx.controls.Alert.show(msg);
            }
        ]]>
    </fx:Script>
    <s:Panel title="Profile" verticalCenter="0" horizontalCenter="0">
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <mx:DateField text="12/07/2013" id="thisDateField" change="showMsg(thisDateField.selectedDate.toString())"/>
        <mx:DateChooser id="thisDateChooser" maxYear="2014" minYear="2012" selectedDate="{new Date(2013,07,17)}" change="showMsg(thisDateChooser.selectedDate.toString())">
            
        </mx:DateChooser>
    </s:Panel>
</s:Application>
View Code

以上为ri.mxml文件,为新建应用程序。

空间DateChooser

DateField

Copyright © 2024 诸葛小北
Powered by .NET 9.0 on Kubernetes