Add Current Date to Input Fields

Ok so i’ve got three text boxes in which i need the current date to display (one text box for the year, one for the month, one for the day). Simple, no? The only issue i’m having is i need to have a provision for users to change the date in these text boxes. So basically i need three input boxes that display the current date (one input box for year, one for month, one for day). However I cant find any way to do this. All the tutorials (even the one on this site) only puts the date into dynamic text boxes. If i try changing my boxes to Input Text boxes…well the date still displays, but it can’t be modified like in a normal Input Box.

Here’s the code i’m using (pretty simple):

 
onClipEvent (enterFrame) {
	theDate = new Date();
	theMonth = theDate.getMonth();
	theDay = theDate.getDate();
	theYear = theDate.getFullYear();
	yearField = theYear;
	monthField = theMonth;
	dayField = theDay;
}

yearField, monthField, and dayField are the Input Boxes where i want the date to display. However i want the input boxes to retain thier ability to be changed and edited to the user’s will.

I’d appreciate any ideas to solve this problem. Thanks!

Hi

Here is the code just try this:

da = new Date();
mon = [“Jan,”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Sep”,“Oct”,“Nov”,“Dec”];

date1.text = da.getDate()
date2.text = mon[da.getMonth()]
date3.text = da.getFullYear()

//date1, date2, date3 are the names given to the Input textFields.


aShIsH