Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

date script can someone confirm that it works....

$
0
0

When a date is entered into "tx4" a text box I want the a date to appear in tx15 that is 1 year later... example.....entered into tx4 (4/25/2015) appears in tx15 (4/25/2016)

 

also do I have to format the text boxes...tx4 and tx15 

 

 

var nDate = new Date(tx4.value);

nDate.setYear(nDate.getYear( ) + 1 );

tx15.value = (nDate.getYear() + 1) + "/" + (nDate.getDate()) + "/" + (nDate.getFullYear());


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>