@@ -164,12 +164,12 @@ const Days: React.FC<Props> = ({
164
164
next : nextMonth ( calendarData . date )
165
165
} ;
166
166
const newDate = object [ type as keyof typeof object ] ;
167
- const newHover = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
167
+ const formattedDate = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
168
168
day >= 10 ? day : "0" + day
169
169
} `;
170
- return dayjs ( newHover ) . isSame ( dayjs ( minDate ) )
170
+ return dayjs ( formattedDate ) . isSame ( dayjs ( minDate ) )
171
171
? false
172
- : dayjs ( newHover ) . isBefore ( dayjs ( minDate ) ) ;
172
+ : dayjs ( formattedDate ) . isBefore ( dayjs ( minDate ) ) ;
173
173
} ,
174
174
[ calendarData . date , minDate ]
175
175
) ;
@@ -185,12 +185,12 @@ const Days: React.FC<Props> = ({
185
185
next : nextMonth ( calendarData . date )
186
186
} ;
187
187
const newDate = object [ type as keyof typeof object ] ;
188
- const newHover = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
188
+ const formattedDate = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
189
189
day >= 10 ? day : "0" + day
190
190
} `;
191
- return dayjs ( newHover ) . isSame ( maxDate )
191
+ return dayjs ( formattedDate ) . isSame ( maxDate )
192
192
? false
193
- : dayjs ( newHover ) . isAfter ( dayjs ( maxDate ) ) ;
193
+ : dayjs ( formattedDate ) . isAfter ( dayjs ( maxDate ) ) ;
194
194
} ,
195
195
[ calendarData . date , maxDate ]
196
196
) ;
@@ -206,7 +206,7 @@ const Days: React.FC<Props> = ({
206
206
next : nextMonth ( calendarData . date )
207
207
} ;
208
208
const newDate = object [ type as keyof typeof object ] ;
209
- const newHover = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
209
+ const formattedDate = `${ newDate . year ( ) } -${ newDate . month ( ) + 1 } -${
210
210
day >= 10 ? day : "0" + day
211
211
} `;
212
212
@@ -217,14 +217,14 @@ const Days: React.FC<Props> = ({
217
217
let matchingCount = 0 ;
218
218
disabledDates ?. forEach ( dateRange => {
219
219
if (
220
- dayjs ( newHover ) . isAfter ( dateRange . startDate ) &&
221
- dayjs ( newHover ) . isBefore ( dateRange . endDate )
220
+ dayjs ( formattedDate ) . isAfter ( dateRange . startDate ) &&
221
+ dayjs ( formattedDate ) . isBefore ( dateRange . endDate )
222
222
) {
223
223
matchingCount ++ ;
224
224
}
225
225
if (
226
- dayjs ( newHover ) . isSame ( dateRange . startDate ) ||
227
- dayjs ( newHover ) . isSame ( dateRange . endDate )
226
+ dayjs ( formattedDate ) . isSame ( dateRange . startDate ) ||
227
+ dayjs ( formattedDate ) . isSame ( dateRange . endDate )
228
228
) {
229
229
matchingCount ++ ;
230
230
}
0 commit comments