Only calculate min/max from the current date
This commit is contained in:
@@ -29,8 +29,8 @@ export const ForecastDatePicker = function ({
|
|||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
value={formatDate(dateTime)}
|
value={formatDate(dateTime)}
|
||||||
min={formatDate(minDate(dateTime))}
|
min={formatDate(minDate(new Date()))}
|
||||||
max={formatDate(maxDate(dateTime))}
|
max={formatDate(maxDate(new Date()))}
|
||||||
onChange={(e) => onChange(e.target.valueAsDate)}
|
onChange={(e) => onChange(e.target.valueAsDate)}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user