Flex DateFiled日期范围
开始日期 与 结束日期的范围选择
两者都不能大于今天,开始日期不能大于结束日期
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" backgroundGradientColors="[#ffffff, #ffffff]">
<mx:Script>
<!--[CDATA[
import mx.controls.DateField;
[Bindable]
private var today:Date = new Date(new Date().setHours(0,0,0,0));
[Bindable]
private var start:Date = today;
[Bindable]
private var end:Date = start;
//=======================================
//Event Handler
//=======================================
/*DateChange*/
private function onDateChangeHandler(event:Event):void
{
//var currentDF:DateField = DateField(event.currentTarget);
if(startDF.text == "")
{
startDF.selectedDate = start;
}
else
{
start = startDF.selectedDate;
}
if(endDF.text == "")
{
endDF.selectedDate = this.end;
}
else
{
this.end = endD
相关文档:
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
<?xml version="1.0"?>
<!-- charts/MemoryGraph.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="initTimer()">
<mx:Script>
<!--[CDATA[
import flash.utils.Timer;
import flash.events.TimerEve ......
<?xml version="1.0"?>
<!-- charts/GradientFills.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection=new Arra ......
<?xml version="1.0"?>
<!-- charts/DataPointAlert.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
import mx.controls.Alert;
import mx.charts.events.ChartItemEvent;
import mx.collections.Array ......