@@ -36,7 +36,7 @@ function renderWeekdays(styles, dateOptions, weekdayDisplayFormat) {
3636class Month extends PureComponent {
3737 render ( ) {
3838 const now = new Date ( ) ;
39- const { displayMode, focusedRange, drag, styles, disabledDates } = this . props ;
39+ const { displayMode, focusedRange, drag, styles, disabledDates, disabledDay } = this . props ;
4040 const minDate = this . props . minDate && startOfDay ( this . props . minDate ) ;
4141 const maxDate = this . props . maxDate && endOfDay ( this . props . maxDate ) ;
4242 const monthDisplay = getMonthDisplayRange (
@@ -76,6 +76,7 @@ class Month extends PureComponent {
7676 const isDisabledSpecifically = disabledDates . some ( disabledDate =>
7777 isSameDay ( disabledDate , day )
7878 ) ;
79+ const isDisabledDay = disabledDay ( day ) ;
7980 return (
8081 < DayCell
8182 { ...this . props }
@@ -89,7 +90,7 @@ class Month extends PureComponent {
8990 isStartOfMonth = { isStartOfMonth }
9091 isEndOfMonth = { isEndOfMonth }
9192 key = { index }
92- disabled = { isOutsideMinMax || isDisabledSpecifically }
93+ disabled = { isOutsideMinMax || isDisabledSpecifically || isDisabledDay }
9394 isPassive = {
9495 ! isWithinInterval ( day , {
9596 start : monthDisplay . startDateOfMonth ,
@@ -121,6 +122,7 @@ Month.propTypes = {
121122 drag : PropTypes . object ,
122123 dateOptions : PropTypes . object ,
123124 disabledDates : PropTypes . array ,
125+ disabledDay : PropTypes . func ,
124126 preview : PropTypes . shape ( {
125127 startDate : PropTypes . object ,
126128 endDate : PropTypes . object ,
0 commit comments