# Add Current Date to Input Fields

**URL:** <https://forum.kirupa.com/t/add-current-date-to-input-fields/123018>\
**Category:** Uncategorized\
**Created:** [September 19, 2004, 2:11pm UTC](https://forum.kirupa.com/t/add-current-date-to-input-fields/123018 "2004-09-19T14:11:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tajmahal](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@tajmahal](https://forum.kirupa.com/u/tajmahal)\
**Post date:** [September 19, 2004, 2:11pm UTC](https://forum.kirupa.com/t/add-current-date-to-input-fields/123018/1 "2004-09-19T14:11:26Z")

</div>

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):

```auto
 
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!
