Only calculate min/max from the current date

This commit is contained in:
Florian Schroedl
2024-01-23 17:11:42 +01:00
parent a177aaedea
commit c625365c8b

View File

@@ -29,8 +29,8 @@ export const ForecastDatePicker = function ({
<input
type="date"
value={formatDate(dateTime)}
min={formatDate(minDate(dateTime))}
max={formatDate(maxDate(dateTime))}
min={formatDate(minDate(new Date()))}
max={formatDate(maxDate(new Date()))}
onChange={(e) => onChange(e.target.valueAsDate)}
/>
</label>