@@ -191,15 +191,6 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
191
191
*/
192
192
public callback : ( next ) => void ;
193
193
194
- /**
195
- * The default `tabindex` attribute for the component.
196
- *
197
- * @hidden
198
- * @internal
199
- */
200
- @HostBinding ( 'attr.tabindex' )
201
- public tabindex = 0 ;
202
-
203
194
/**
204
195
* The default aria role attribute for the component.
205
196
*
@@ -782,7 +773,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
782
773
public resetActiveDate ( ) {
783
774
if ( ! this . monthViews ) { return ; }
784
775
let dates = [ ] ;
785
- this . monthViews . map ( mv => mv . dates ) . forEach ( days => { dates = dates . concat ( days . toArray ( ) ) ; } ) ;
776
+ this . monthViews . map ( mv => mv . dates ) . forEach ( days => { dates = dates . concat ( days . toArray ( ) ) ; } ) ;
786
777
const date = dates . find ( day => day . selected && day . isCurrentMonth ) || dates . find ( day => day . isToday && day . isCurrentMonth )
787
778
|| dates . find ( d => d . isFocusable ) ;
788
779
if ( date ) {
@@ -943,12 +934,17 @@ export class IgxCalendarComponent extends IgxMonthPickerBaseDirective implements
943
934
}
944
935
}
945
936
946
- @HostListener ( 'focusout' , [ '$event' ] )
947
- public onPointerDown ( event ) {
948
- /* if (event.path.contains('igx-days-view')) {
949
- return;
950
- } */
951
- console . log ( event ) ;
937
+ @HostListener ( 'document:pointerup' )
938
+ public pointerUp ( ) {
939
+ this . resetActiveDate ( ) ;
940
+ }
941
+
942
+ @HostListener ( 'keydown.tab' , [ '$event' ] )
943
+ @HostListener ( 'keydown.shift.tab' , [ '$event' ] )
944
+ public onTab ( event ) {
945
+ if ( event . target . tagName . toLowerCase ( ) === 'igx-day-item' ) {
946
+ requestAnimationFrame ( ( ) => this . resetActiveDate ( ) ) ;
947
+ }
952
948
}
953
949
954
950
/**
0 commit comments