From 208393309c9f9ea4f79e462e2b823f04fe7f7c75 Mon Sep 17 00:00:00 2001 From: tejas-agravat-fullstack-dev Date: Mon, 20 Oct 2025 23:27:02 +0530 Subject: [PATCH 1/2] fix(calendar): display startDate as first month in range selection - Fixes issue #5939 --- src/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 5040c983b..8b250b16b 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -336,6 +336,9 @@ export class DatePicker extends Component { ) { this.setState({ monthSelectedIn: 0 }); } + if (this.props.selectsRange && this.state.monthSelectedIn !== 0) { + this.setState({ monthSelectedIn: 0 }); + } if (prevProps.highlightDates !== this.props.highlightDates) { this.setState({ highlightDates: getHighLightDaysMap(this.props.highlightDates), @@ -1518,6 +1521,8 @@ export class DatePicker extends Component { } render(): React.ReactElement | null { + console.log("Test"); + const calendar = this.renderCalendar(); if (this.props.inline) return calendar; From 087a513ee548c992ca39eef5d336987a5980318e Mon Sep 17 00:00:00 2001 From: tejas-agravat-fullstack-dev Date: Mon, 20 Oct 2025 23:46:50 +0530 Subject: [PATCH 2/2] Remove console --- src/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 8b250b16b..4f4be4450 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1521,8 +1521,6 @@ export class DatePicker extends Component { } render(): React.ReactElement | null { - console.log("Test"); - const calendar = this.renderCalendar(); if (this.props.inline) return calendar;