论坛首页 编程语言技术论坛

设置日期选择组件(DateField )的选择范围

浏览 4002 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-04-27  

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

    
<mx:Form>
        
<mx:FormItem label="rangeStart only:">
            
<mx:DateField id="dateField1"
                    showToday
="false"
                    selectableRange
="{{rangeStart:new Date()}}" />
        
</mx:FormItem>
        
<mx:FormItem label="rangeEnd only:">
            
<mx:DateField id="dateField2"
                    showToday
="false"
                    selectableRange
="{{rangeEnd:new Date()}}" />
        
</mx:FormItem>
        
<mx:FormItem label="rangeStart/rangeEnd:">
            
<mx:DateField id="dateField3"
                    showToday
="false"
                    selectableRange
="{{rangeStart:new Date(2007, 11, 3),
                                      rangeEnd:new Date(2007,11,28)}}
" />
        
</mx:FormItem>
    
</mx:Form>

</mx:Application>

论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics