@@ -762,6 +762,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
762
762
this . callback ( this . nextDate ) ;
763
763
}
764
764
this . animationAction = ScrollMonth . NONE ;
765
+ this . resetActiveDate ( ) ;
765
766
}
766
767
767
768
/**
@@ -778,11 +779,12 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
778
779
* @hidden
779
780
* @internal
780
781
*/
781
- public resetActiveDate ( param ? ) {
782
+ public resetActiveDate ( ) {
782
783
if ( ! this . monthViews ) { return ; }
783
784
let dates = [ ] ;
784
785
this . monthViews . map ( mv => mv . dates ) . forEach ( days => { dates = dates . concat ( days . toArray ( ) ) ; } ) ;
785
- const date = dates . find ( day => day . selected ) || dates . find ( day => day . isToday ) || dates . find ( d => d . isFocusable ) ;
786
+ const date = dates . find ( day => day . selected && day . isCurrentMonth ) || dates . find ( day => day . isToday && day . isCurrentMonth )
787
+ || dates . find ( d => d . isFocusable ) ;
786
788
if ( date ) {
787
789
this . activeDate = date . date . date . toLocaleDateString ( ) ;
788
790
}
@@ -801,7 +803,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
801
803
return ;
802
804
}
803
805
804
-
805
806
const isPageDown = event . key === 'PageDown' ;
806
807
const step = isPageDown ? 1 : - 1 ;
807
808
let monthView = this . daysView as IgxDaysViewComponent ;
@@ -942,6 +943,14 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
942
943
}
943
944
}
944
945
946
+ @HostListener ( 'focusout' , [ '$event' ] )
947
+ public onPointerDown ( event ) {
948
+ /* if (event.path.contains('igx-days-view')) {
949
+ return;
950
+ } */
951
+ console . log ( event ) ;
952
+ }
953
+
945
954
/**
946
955
* @hidden
947
956
* @internal
0 commit comments