Establecer la fecha minima

by Porfirio Chavez

HTML

<input type="date" name="fecha" id="fecha" required/>

JavaScript

const today = new Date();
const tomorrow = new Date();
tomorrow.setDate(today.getDate() + 1);

const minValue = tomorrow.toISOString().split("T")[0];

document.getElementById('fecha').min = minValue;


// VERSION SIMPLIFICADA
/**
const minValue = new Date();
minValue.setDate(minValue.getDate() + 1);
document.getElementById('fecha').min = minValue.toISOString().split("T")[0];;
*/