@@ -25,6 +25,7 @@ import {
25
25
ViewChild ,
26
26
ViewEncapsulation ,
27
27
} from '@angular/core' ;
28
+ import { CalendarView } from '@angular/cdk/datepicker' ;
28
29
import { DateAdapter , MAT_DATE_FORMATS , MatDateFormats } from '@angular/material/core' ;
29
30
import { Subject , Subscription } from 'rxjs' ;
30
31
import { createMissingDateImplError } from './datepicker-errors' ;
@@ -169,7 +170,7 @@ export class MatCalendarHeader<D> {
169
170
encapsulation : ViewEncapsulation . None ,
170
171
changeDetection : ChangeDetectionStrategy . OnPush ,
171
172
} )
172
- export class MatCalendar < D > implements AfterContentInit , AfterViewChecked , OnDestroy , OnChanges {
173
+ export class MatCalendar < D > extends CalendarView < D > implements AfterContentInit , AfterViewChecked , OnDestroy , OnChanges {
173
174
/** An input indicating the type of the header component, if set. */
174
175
@Input ( ) headerComponent : ComponentType < any > ;
175
176
@@ -278,6 +279,7 @@ export class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDes
278
279
@Optional ( ) private _dateAdapter : DateAdapter < D > ,
279
280
@Optional ( ) @Inject ( MAT_DATE_FORMATS ) private _dateFormats : MatDateFormats ,
280
281
changeDetectorRef : ChangeDetectorRef ) {
282
+ super ( ) ;
281
283
282
284
if ( ! this . _dateAdapter ) {
283
285
throw createMissingDateImplError ( 'DateAdapter' ) ;
0 commit comments