I´m struggling a little bit with this topic, Im not profesional developer and may not make sense what Im doing at all.
Basically, I want to achieve the following:
This is my code:
var today = new Date();
var nextDay = new Date();
today.setDate(today.getDate());
today = today.toISOString().split('T')[0];
nextDay.setDate(nextDay.getDate() + 1);
nextDay = nextDay.toISOString().split('T')[0];
document.getElementsByName("Date of Arrival")[0].setAttribute('min', today);
document.getElementsByName("Date of Departure")[0].setAttribute('min', nextDay);
<div class="form-group container-div-style">
<label class="contact-form-text text-left">FECHA DE LLEGADA*<br>
</label>
<input id="Date of Arrival" class="form-control contact-form-text field-style" required="" type="date" placeholder="DD/MM/AAAA" blocs-custom-data-attributes="name" name="Date of Arrival" min="" max="">
</div>
<div class="form-group container-div-0-style text-left">
<label class="contact-form-text text-center">FECHA DE SALIDA*<br>
</label>
<input id="Date of Departure" class="form-control contact-form-text" required="" type="date" placeholder="DD/MM/AAAA" blocs-custom-data-attributes="name" name="Date of Departure" min="" max="">
</div>
At the moment what I get on "Date of Departure" is always today+1