Merge pull request 'In the Date Range Picker, users should not be able to select any date in the future; future dates must be disabled.' (#250) from Kartik_Bug#730 into Issues_July_2W
Reviewed-on: #250 Merged
This commit is contained in:
commit
a14f2b0738
@ -26,7 +26,8 @@ const DateRangePicker = ({
|
||||
altFormat: "d-m-Y",
|
||||
defaultDate: [startDate, endDate],
|
||||
static: true,
|
||||
clickOpens: true,
|
||||
clickOpens: true,
|
||||
maxDate: endDate, // ✅ Disable future dates
|
||||
onChange: (selectedDates, dateStr) => {
|
||||
const [startDateString, endDateString] = dateStr.split(" to ");
|
||||
onRangeChange?.({ startDate: startDateString, endDate: endDateString });
|
||||
@ -54,4 +55,4 @@ const DateRangePicker = ({
|
||||
);
|
||||
};
|
||||
|
||||
export default DateRangePicker;
|
||||
export default DateRangePicker;
|
||||
|
Loading…
x
Reference in New Issue
Block a user