Hi,
I have the following code which displays a date in an input field. What I would like to do is to have the day increase by 5 days. However, if the day is 30/31, it increases to 35/36 instead of rolling into the next month. How can I do this?
var future = new Date();
var fdd = future.getDate()+5;
var fmm = future.getMonth()+1; //January is 0!
var fyyyy = future.getFullYear();
if(fdd<10) {
fdd='0'+fdd
}
if(fmm<10) {
fmm='0'+fmm
}
future = fdd+'/'+fmm+'/'+fyyyy;
document.write(future);
document.getElementById("end").value = future;
Thanks