File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -70,24 +70,24 @@ describe('MdDatepicker', () => {
70
70
} ) ) ;
71
71
72
72
it ( 'open non-touch should open popup' , ( ) => {
73
- expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . toBeNull ( ) ;
73
+ expect ( document . querySelector ( '.cdk-overlay-pane.mat-datepicker-popup ' ) ) . toBeNull ( ) ;
74
74
75
75
testComponent . datepicker . open ( ) ;
76
76
fixture . detectChanges ( ) ;
77
77
78
- expect ( document . querySelector ( '.cdk-overlay-pane' ) ) . not . toBeNull ( ) ;
78
+ expect ( document . querySelector ( '.cdk-overlay-pane.mat-datepicker-popup ' ) ) . not . toBeNull ( ) ;
79
79
} ) ;
80
80
81
81
it ( 'open touch should open dialog' , ( ) => {
82
82
testComponent . touch = true ;
83
83
fixture . detectChanges ( ) ;
84
84
85
- expect ( document . querySelector ( 'md-dialog-container' ) ) . toBeNull ( ) ;
85
+ expect ( document . querySelector ( '.mat-datepicker-dialog md-dialog-container' ) ) . toBeNull ( ) ;
86
86
87
87
testComponent . datepicker . open ( ) ;
88
88
fixture . detectChanges ( ) ;
89
89
90
- expect ( document . querySelector ( 'md-dialog-container' ) ) . not . toBeNull ( ) ;
90
+ expect ( document . querySelector ( '.mat-datepicker-dialog md-dialog-container' ) ) . not . toBeNull ( ) ;
91
91
} ) ;
92
92
93
93
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 MdDatepicker<D> implements OnDestroy {
302
302
this . _dialogRef = this . _dialog . open ( MdDatepickerContent , {
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 MdDatepicker<D> implements OnDestroy {
338
339
hasBackdrop : true ,
339
340
backdropClass : 'md-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 ( overlayState ) ;
You can’t perform that action at this time.
0 commit comments