Once created the datefield, use this code in a ActionScript function:

inputDate.selectedDate = new Date();

where inputDate:

<mx:DateField id="inputDate" dateFormatter="formatDate" />

You can format it using this function:

function formatDate(item) {
var df:DateFormatter = new DateFormatter();

df.formatString = "DD/MM/YYYY"; // this the mask

return df.format(item);
}


Hope it helps...;-)


Isaac Bib�s Forado





Reply via email to