Skip to content

Commit

Permalink
Fix #4015 Calendar: disabledDays prop also disable months (#4389)
Browse files Browse the repository at this point in the history
* Fixed #4370, disabledDates broken for month view

* Fix #4015 disabledDays disabled month as well

* Fix #4015 fix code format
  • Loading branch information
legarsjules authored May 12, 2023
1 parent 16b5211 commit 9e3a4d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ export const Calendar = React.memo(
validDate = !isDateDisabled(day, month, year);
}

if (props.disabledDays) {
if (props.disabledDays && currentView !== 'month') {
validDay = !isDayDisabled(day, month, year);
}

Expand Down

0 comments on commit 9e3a4d1

Please sign in to comment.