JSFiddle - React, Tailwind, and code Playground
HTML
<input type="date" id="datepicker1">
<input type="date" id="datepicker2">
<input type="date" id="datepicker3">
<script>
// Formt date as YYYY-MM-DD
function oneformatISOLocal(d) {
let z = n => ('0' + n).slice(-2);
return d.getFullYear()+'-'+z(d.getMonth()+1) + '-' + z(d.getDate());
}
window.onload = function() {
let inp = document.querySelector('#datepicker1');
let d = new Date();
inp.min = oneformatISOLocal(d);
inp.defaultValue = inp.min;
d.setFullYear(d.getFullYear() + 1);
inp.max = oneformatISOLocal(d);
// Debug
console.log(inp.outerHTML);
}
</script>