In the Date Range Picker, users should not be able to select any date in the future; future dates must be disabled. #250

Merged
pramod.mahajan merged 1 commits from Kartik_Bug#730 into Issues_July_2W 2025-07-11 11:06:54 +00:00
Showing only changes of commit a73ac284bd - Show all commits

View File

@ -27,6 +27,7 @@ const DateRangePicker = ({
defaultDate: [startDate, endDate],
static: true,
clickOpens: true,
maxDate: endDate, // Disable future dates
onChange: (selectedDates, dateStr) => {
const [startDateString, endDateString] = dateStr.split(" to ");
onRangeChange?.({ startDate: startDateString, endDate: endDateString });