设置日期选择组件DateField年选择范围和上下选择按钮.

minYear 和 maxYear 属性,yearNavigationEnabled属性
示例:


代码:

 

<? xml version="1.0" encoding="utf-8" ?>
<!--  http://blog.flexexamples.com/2007/12/17/setting-a-minimum-and-maximum-allowable-year-in-the-flex-datefield-control/  -->
< mx:Application  xmlns:mx ="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="top"
        backgroundColor
="white" >

    
< mx:DateField  id ="dateField"
            yearNavigationEnabled
="true"
            minYear
="2000"
            maxYear
="2010"   />

</ mx:Application >

你可能感兴趣的:(Field)