Estoy usando la biblioteca 'Pickaday Js' para las fechas.
tengo html como este
<input class="today" type="date" id="today"> <input class="another_day" type="date" id="another_day">tengo javascript como este
var today = new Pikaday({ field: document.getElementById("today"), minDate: new Date(), }); var another_day = new Pikaday({ field: document.getElementById("another_day"), minDate: new Date(), maxDate: today.value + 15 // I want the max date to be the today input date + 15 days });¿Puede alguien ayudarme a lograr esto?
Resuelto.
var another_day = new Pikaday({ field: document.getElementById("another_day"), minDate: new Date(), new Date(new Date(document.getElementById("today").value).getTime()+(15*24*60*60*1000)) // Added 15 days to input today });