I want to set the current date as the min date without giving a fixed date like the below
<input
type="date"
className="form-control"
placeholder="Pick a date"
name="closingDate"
min="2022-10-14"
onChange={(e) => setClosingDate(e.target.value)}
/>
>Solution :
try this…
<input
type="date"
className="form-control"
placeholder="Pick a date"
name="closingDate"
min={new Date().toJSON().slice(0, 10)}
onChange={(e) => setClosingDate(e.target.value)}
/>