Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Today's Date in the year 2099


Level 3

This is a simple question from a newbie that I'm sure some of you pros can figure out in your sleep.  Have a form with a checkbox and date/text field next to the checkbox.  If the box is checked, I would like the text field to display today's date in the year 2099, e.g., 06/16/2099. 

I put this javascript code under the change event of the checkbox, but it doesn't seem to be working.  When I check the box, nothing happens. 

Any ideas?????


today = new Date();


month = today.getMonth()+1;


day = today.getDate();





= day + "/" + month + "/2099";


0 Replies


Level 10

The last { shoudl be a } ...thats the only thing I see that is wrong.



Level 3

See!  You are brilliant!

I am still having an issue however.  I have put this script in the change event of the checkbox b/c there is code that marks the checkbox based on a selection in a droplist.  The goal is:  certain selection in droplist results in checkbox being marked and date being added.  When I make the selection in droplist, it marks the checkbox, but doesn't populate the text field with the date.  If I manually mark the checkbox, the date is added to the text field.

Any suggestions?


Level 3

Nevermind - I figured it out.  I just put the date variable and date code in the exit event of the dropdown with the other code so now if I make a certain selection from the drop down, it marks the checkbox AND enters the date.  Cool!

Thanks so much, you have helped me more than you will ever know.