From e197722be05851d3bf5d09871a03c7624df7a58d Mon Sep 17 00:00:00 2001 From: Shahab Date: Sat, 18 May 2024 10:16:22 +0330 Subject: [PATCH] fix: Handle display of next month's days #294 --- changelog.md | 4 ++++ package.json | 2 +- src/components/day_picker/day_picker.js | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 3d89fc37..2ac044eb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 4.5.1 + +- Prevent showing the week of the next month [#294](https://github.com/shahabyazdi/react-multi-date-picker/issues/294) + # 4.5.0 - Keyboard accessibility improvement [#290](https://github.com/shahabyazdi/react-multi-date-picker/issues/290), [#245](https://github.com/shahabyazdi/react-multi-date-picker/issues/245), [#260](https://github.com/shahabyazdi/react-multi-date-picker/issues/260) diff --git a/package.json b/package.json index 306bdd37..81e4361a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-multi-date-picker", - "version": "4.5.0", + "version": "4.5.1", "description": "A simple React datepicker component for working with gregorian, persian, arabic and indian calendars with the ability to select the date by single, multiple, range and multiple range pickers.", "main": "./build/index.js", "types": "index.d.ts", diff --git a/src/components/day_picker/day_picker.js b/src/components/day_picker/day_picker.js index cbfbe600..cae8a4db 100644 --- a/src/components/day_picker/day_picker.js +++ b/src/components/day_picker/day_picker.js @@ -334,8 +334,7 @@ function getMonths(date, showOtherDays, numberOfMonths, weekStartDayIndex) { weeks.push(week); - if (weekIndex > 2 && date.monthIndex !== monthIndex && !showOtherDays) - break; + if (weekIndex > 2 && date.monthIndex !== monthIndex) break; } months.push(weeks);