What\'s wrong with this script?
When I set my clock to say 29/04/2011 it adds 36/4/2011 in the week input! but the correct date should be 6/
var future = new Date(); // get today date future.setDate(future.getDate() + 7); // add 7 days var finalDate = future.getFullYear() +'-'+ ((future.getMonth() + 1) < 10 ? '0' : '') + (future.getMonth() + 1) +'-'+ future.getDate(); console.log(finalDate);