File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -82,24 +82,25 @@ describe('MatDatepicker', () => {
82
82
} ) ) ;
83
83
84
84
it ( 'open non-touch should open popup' , ( ) => {
85
- expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
85
+ expect ( document . querySelector ( '.cdk-overlay-pane.mat-datepicker-popup ' ) ) . toBeNull ( ) ;
86
86
87
87
testComponent . datepicker . open ( ) ;
88
88
fixture . detectChanges ( ) ;
89
89
90
- expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . not . toBeNull ( ) ;
90
+ expect ( document . querySelector ( '.cdk-overlay-pane.mat-datepicker-popup ' ) ) . not . toBeNull ( ) ;
91
91
} ) ;
92
92
93
93
it ( 'open touch should open dialog' , ( ) => {
94
94
testComponent . touch = true ;
95
95
fixture . detectChanges ( ) ;
96
96
97
- expect ( document . querySelector ( 'mat-dialog-container' ) ) . toBeNull ( ) ;
97
+ expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container' ) ) . toBeNull ( ) ;
98
98
99
99
testComponent . datepicker . open ( ) ;
100
100
fixture . detectChanges ( ) ;
101
101
102
- expect ( document . querySelector ( 'mat-dialog-container' ) ) . not . toBeNull ( ) ;
102
+ expect ( document . querySelector ( '.mat-datepicker-dialog mat-dialog-container' ) )
103
+ . not . toBeNull ( ) ;
103
104
} ) ;
104
105
105
106
it ( 'open in disabled mode should not open the calendar' , ( ) => {
Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ export class MatDatepicker<D> implements OnDestroy {
302
302
this . _dialogRef = this . _dialog . open ( MatDatepickerContent , {
303
303
direction : this . _dir ? this . _dir . value : 'ltr' ,
304
304
viewContainerRef : this . _viewContainerRef ,
305
+ panelClass : 'mat-datepicker-dialog' ,
305
306
} ) ;
306
307
this . _dialogRef . afterClosed ( ) . subscribe ( ( ) => this . close ( ) ) ;
307
308
this . _dialogRef . componentInstance . datepicker = this ;
@@ -338,7 +339,8 @@ export class MatDatepicker<D> implements OnDestroy {
338
339
hasBackdrop : true ,
339
340
backdropClass : 'mat-overlay-transparent-backdrop' ,
340
341
direction : this . _dir ? this . _dir . value : 'ltr' ,
341
- scrollStrategy : this . _scrollStrategy ( )
342
+ scrollStrategy : this . _scrollStrategy ( ) ,
343
+ panelClass : 'mat-datepicker-popup' ,
342
344
} ) ;
343
345
344
346
this . _popupRef = this . _overlay . create ( overlayConfig ) ;
You can’t perform that action at this time.
0 commit comments