File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
120120 )
121121 : undefined
122122
123+ const validDisabledDates = validRange ?. disabledDates
124+ ? validRange ?. disabledDates
125+ : undefined
126+
123127 const { monthName, month, year } = React . useMemo ( ( ) => {
124128 const md = addMonths ( new Date ( ) , realIndex )
125129 const y = md . getFullYear ( )
@@ -159,8 +163,12 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
159163
160164 const isFirstDayOfMonth = dayOfMonth === 1
161165 const isLastDayOfMonth = dayOfMonth === daysInMonth
162-
163- inDisabledDates = validRange ?. disabledDates ? validRange . disabledDates . some ( disabledDate => areDatesOnSameDay ( disabledDate , day ) ) : false
166+
167+ inDisabledDates = validDisabledDates
168+ ? validDisabledDates . some ( ( disabledDate ) =>
169+ areDatesOnSameDay ( disabledDate , day )
170+ )
171+ : false
164172 if ( inDisabledDates ) {
165173 disabled = true
166174 }
@@ -280,6 +288,7 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
280288 dates ,
281289 validRangeStart ,
282290 validRangeEnd ,
291+ validDisabledDates ,
283292 mode ,
284293 ] )
285294
You can’t perform that action at this time.
0 commit comments