Im using html5 datepicker like [input type="date"],
I just need to increment current date + 1. i mean show the tomorrow date and future dates only, the current date and previous dates wants to go disable state only show the future dates..
anyone please help me..
here is my tried code.
// Disable date
var input = document.getElementById("preDate");
var today = new Date();
var day = today.getDate()+1;
var mon = new String(today.getMonth()+1); //January is 0!
var yr = today.getFullYear();
if (mon.length < 0) {
mon = "0" + mon;
}
var date = new String(yr + '-' + mon + '-' + day);
input.disabled = false;
input.setAttribute('min', date);
<div class="form-group col-3 rfdate">
<label class="col-sm-6 control-label p-sm-0">Refund Date</label>
<input type="date" class="form-control" id="preDate" name="preDate" />
</div>
Fiddle: Code Here..