I am using SDK 3.3 and this works for me:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical">
     <mx:Script>
         <![CDATA[
             [Bindable] private var year:int = new Date().getFullYear();
         ]]>
     </mx:Script>
     <mx:DateField maxYear="{year}" minYear="{year - 9}"/>
</mx:Application>

I can only select a date between Jan 2000 and Dec 2009.


--- In [email protected], "flexcoder2008" <djohnso...@...>
wrote:
>
> I have a DateField and if I set the minYear or the maxYear property to
a value directly, everything works great.
>
> eg.
>
> <mx:Datefield maxYear="2009" minYear="2000"/>
>
> But if I want to use a calculated value in there, it doesn't work.  I
can navigate past this value.
>
> eg.
>
> [Bindable]
> var year:int = new Date().getFullYear();
>
>
>
> <mx:DateField maxYear = "{year}" minYear="{year - 10}"/>
>
>
> Why is this? Does anybody have a workaround for this?
>

Reply via email to