diff --git a/src/day.tsx b/src/day.tsx index 49c59ff61..1c28426a5 100644 --- a/src/day.tsx +++ b/src/day.tsx @@ -312,7 +312,6 @@ export default class Day extends Component { if ( selectsEnd && startDate && - !endDate && (isAfter(selectingDate, startDate) || isEqual(selectingDate, startDate)) ) { return isDayInRange(day, startDate, selectingDate); diff --git a/src/test/datepicker_test.test.tsx b/src/test/datepicker_test.test.tsx index b4c64021d..54d9d900a 100644 --- a/src/test/datepicker_test.test.tsx +++ b/src/test/datepicker_test.test.tsx @@ -3153,35 +3153,6 @@ describe("DatePicker", () => { ).toBe(true); } }); - - it("should not apply '--in-selecting-range' class to the days till the date that matched selectedDate in the next months (endDatePicker)", () => { - const startDay = 3; - const endDay = 8; - const startDate = new Date(`2025/02/${startDay}`); - const endDate = new Date(`2025/02/${endDay}`); - - const { container } = render( - , - ); - - goToNextMonth(container); - - for (let i = 1; i <= endDay; i++) { - const inSelectionRangeDay = safeQuerySelector( - container, - `.react-datepicker__day--00${i}`, - ); - expect( - inSelectionRangeDay.classList.contains(IN_RANGE_DAY_CLASS_NAME), - ).toBe(false); - } - }); }); describe("selectsRange without inline", () => {