Copy link to clipboard
Copied
can anyone let me know how to get current system date in flex
and how to compare seleted date and system date in flex
thanks in advance
Copy link to clipboard
Copied
below is the example code which get the date, month and year
when you try to access the month it return less than one (if you try to get the month when the month is set to jan it return zero ) while displaying we need to increment as months starts from one
import mx.controls.Alert;
public function init():void
{
var dt:Date= new Date();
Alert.show("date : "+dt.getDate().toString()+"\nmonth : "+Number(Number(dt.getMonth().toString())+1) +"\nYear : "+dt.getFullYear().toString());
}
if this post answers your question or helps, please mark it as such ![]()
Copy link to clipboard
Copied
hi thats fine to get the current date but am using comboBox for date month and year when i select the current date
it has to show the alert msg can u let me know how can i compare selected date month year and current date month year
Copy link to clipboard
Copied
Use a labelFunction with the ComboBox, and in the function do the compare.
If this post answers your question or helps, please mark it as such. ![]()
Copy link to clipboard
Copied
thank you
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more