With the DateField MXML component, how would I initialize the dates of
2 date components to today and 30 days ago.

I've tried the following:

var aDate :Date = new Date();
var aSecondDate : Date = new Date();
// Does not work below
//aSecondDate -= 30;
// Does not compile below
dtStartDate.selectedDate = aSecondDate  - Date(0, , 30);

// Works but does not set the selected Date. Will set the Text field
but // the SelectedDate is still null
dtStartDate.selectedDate = aSecondDate;
dtEndDate.selectedDate = aDate ;  

Is there a simple example of date arithmetic? Is the selectedDate
field the best way to pull out the selectedDate from the DateField
component? Is there a way to initialize these on startup? Will the
display localize to the dateformat of the viewing browser for
localization?


Rich





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to