@@ -489,10 +489,10 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
489
489
*/
490
490
public nextMonth ( isKeydownTrigger = false ) {
491
491
if ( isKeydownTrigger && this . animationAction === 'prev' ) { return ; }
492
+ this . isKeydownTrigger = isKeydownTrigger ;
492
493
this . previousViewDate = this . viewDate ;
493
494
this . viewDate = this . calendarModel . getNextMonth ( this . viewDate ) ;
494
495
this . animationAction = ScrollMonth . NEXT ;
495
- this . isKeydownTrigger = isKeydownTrigger ;
496
496
}
497
497
498
498
/**
@@ -553,7 +553,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
553
553
requestAnimationFrame ( ( ) => {
554
554
if ( this . dacadeView ) {
555
555
this . dacadeView . date = args ;
556
- this . dacadeView . el . nativeElement . focus ( ) ;
556
+ this . dacadeView . calendarDir . find ( date => date . isCurrentYear ) . nativeElement . focus ( ) ;
557
557
}
558
558
} ) ;
559
559
}
@@ -568,7 +568,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
568
568
requestAnimationFrame ( ( ) => {
569
569
if ( this . dacadeView ) {
570
570
this . dacadeView . date = args ;
571
- this . dacadeView . el . nativeElement . focus ( ) ;
571
+ this . dacadeView . calendarDir . find ( date => date . isCurrentYear ) . nativeElement . focus ( ) ;
572
572
}
573
573
} ) ;
574
574
}
@@ -729,6 +729,9 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
729
729
( event . fromState === 'void' && event . toState === ScrollMonth . NONE ) ) {
730
730
this . viewDateChanged . emit ( { previousValue : this . previousViewDate , currentValue : this . viewDate } ) ;
731
731
}
732
+ if ( ! this . isKeydownTrigger ) {
733
+ this . resetActiveDate ( ) ;
734
+ }
732
735
733
736
if ( this . monthScrollDirection !== ScrollMonth . NONE ) {
734
737
this . scrollMonth$ . next ( ) ;
@@ -753,7 +756,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
753
756
this . callback ( this . nextDate ) ;
754
757
}
755
758
this . animationAction = ScrollMonth . NONE ;
756
- this . resetActiveDate ( ) ;
757
759
}
758
760
759
761
/**
0 commit comments