date with difference of day according to the selection

Hello

sorry i started in the code i did that but no reaction yet sorry to bother you

function addDays(days) {
var date = new Date(); // today
date.setDate(date.getDate() + days); return date;
}

$w.onReady( function () {
$w(“#datePicker1”).minDate = addDays(0);
$w(“#datePicker2”).maxDate = addDays(2);
} );