Skip to content

Commit

Permalink
fix: Handle display of next month's days
Browse files Browse the repository at this point in the history
  • Loading branch information
shahabyazdi committed May 18, 2024
1 parent c6c0fe7 commit e197722
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/components/day_picker/day_picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e197722

Please sign in to comment.