@@ -204,13 +204,18 @@ const Days: React.FC<Props> = ({
204204 ) ;
205205
206206 const buttonClass = useCallback (
207- ( day : number , type : "current" | "previous " | "next " ) => {
207+ ( day : number , type : "current" | "next " | "previous " ) => {
208208 const baseClass = "flex items-center justify-center w-12 h-12 lg:w-10 lg:h-10" ;
209- return cn (
210- baseClass ,
211- ! activeDateData ( day ) . active ? hoverClassByDay ( day ) : activeDateData ( day ) . className ,
212- isDateDisabled ( day , type ) && "line-through"
213- ) ;
209+ if ( type === "current" ) {
210+ return cn (
211+ baseClass ,
212+ ! activeDateData ( day ) . active
213+ ? hoverClassByDay ( day )
214+ : activeDateData ( day ) . className ,
215+ isDateDisabled ( day , type ) && "line-through"
216+ ) ;
217+ }
218+ return cn ( baseClass , isDateDisabled ( day , type ) && "line-through" , "text-gray-400" ) ;
214219 } ,
215220 [ activeDateData , hoverClassByDay , isDateDisabled ]
216221 ) ;
@@ -345,7 +350,7 @@ const Days: React.FC<Props> = ({
345350 type = "button"
346351 key = { index }
347352 disabled = { isDateDisabled ( item , "previous" ) }
348- className = "flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
353+ className = { ` ${ buttonClass ( item , "previous" ) } ` }
349354 onClick = { ( ) => handleClickDay ( item , "previous" ) }
350355 onMouseOver = { ( ) => {
351356 hoverDay ( item , "previous" ) ;
@@ -375,7 +380,7 @@ const Days: React.FC<Props> = ({
375380 type = "button"
376381 key = { index }
377382 disabled = { isDateDisabled ( item , "next" ) }
378- className = "flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
383+ className = { ` ${ buttonClass ( item , "next" ) } ` }
379384 onClick = { ( ) => handleClickDay ( item , "next" ) }
380385 onMouseOver = { ( ) => {
381386 hoverDay ( item , "next" ) ;
0 commit comments