@@ -395,11 +395,11 @@ export const Calendar = React.memo(
395395
396396 newViewDate . setMonth ( 11 ) ;
397397 newViewDate . setFullYear ( newYear ) ;
398- props . onMonthChange && props . onMonthChange ( { month : 11 , year : newYear } ) ;
398+ props . onMonthChange && props . onMonthChange ( { month : 12 , year : newYear } ) ;
399399 setCurrentMonth ( 11 ) ;
400400 } else {
401401 newViewDate . setMonth ( newViewDate . getMonth ( ) - 1 ) ;
402- props . onMonthChange && props . onMonthChange ( { month : currentMonth - 1 , year : currentYear } ) ;
402+ props . onMonthChange && props . onMonthChange ( { month : currentMonth , year : currentYear } ) ;
403403 setCurrentMonth ( ( prevState ) => prevState - 1 ) ;
404404 }
405405 } else if ( currentView === 'month' ) {
@@ -444,11 +444,11 @@ export const Calendar = React.memo(
444444
445445 newViewDate . setMonth ( 0 ) ;
446446 newViewDate . setFullYear ( newYear ) ;
447- props . onMonthChange && props . onMonthChange ( { month : 0 , year : newYear } ) ;
447+ props . onMonthChange && props . onMonthChange ( { month : 1 , year : newYear } ) ;
448448 setCurrentMonth ( 0 ) ;
449449 } else {
450450 newViewDate . setMonth ( newViewDate . getMonth ( ) + 1 ) ;
451- props . onMonthChange && props . onMonthChange ( { month : currentMonth + 1 , year : currentYear } ) ;
451+ props . onMonthChange && props . onMonthChange ( { month : currentMonth + 2 , year : currentYear } ) ;
452452 setCurrentMonth ( ( prevState ) => prevState + 1 ) ;
453453 }
454454 } else if ( currentView === 'month' ) {
0 commit comments