Von :
Zum :
var date = new Date();
var formatFixMonth, formatFixDay;
if( date.getMonth() < 9 ){ formatFixMonth = 0; }else{ formatFixMonth = ""; } if( date.getDate() < 9 ){ formatFixDay = 0; }else{ formatFixDay = ""; } var today = date.getFullYear() + "-" + formatFixMonth + (date.getMonth()+1) + "-" + formatFixDay + date.getDate(); date.setDate(date.getDate()+1); if( date.getMonth() < 9 ){ formatFixMonth = 0; }else{ formatFixMonth = ""; } if( date.getDate() < 9 ){ formatFixDay = 0; }else{ formatFixDay = ""; } var tomorrow = date.getFullYear() + "-" + formatFixMonth + (date.getMonth()+1) + "-" + formatFixDay + date.getDate(); document.getElementById("startDate-de").value = today; document.getElementById("endDate-de").value = tomorrow;