File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ ng_module(
21
21
"//src/cdk/a11y" ,
22
22
"//src/cdk/bidi" ,
23
23
"//src/cdk/coercion" ,
24
+ "//src/cdk/datepicker" ,
24
25
"//src/cdk/keycodes" ,
25
26
"//src/cdk/portal" ,
26
27
"//src/cdk/overlay" ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import {
30
30
ViewEncapsulation ,
31
31
ViewChild ,
32
32
} from '@angular/core' ;
33
+ import { CalendarView } from '@angular/cdk/datepicker' ;
33
34
import { DateAdapter , MAT_DATE_FORMATS , MatDateFormats } from '@angular/material/core' ;
34
35
import { Directionality } from '@angular/cdk/bidi' ;
35
36
import { MatCalendarBody , MatCalendarCell } from './calendar-body' ;
@@ -51,7 +52,7 @@ const DAYS_PER_WEEK = 7;
51
52
encapsulation : ViewEncapsulation . None ,
52
53
changeDetection : ChangeDetectionStrategy . OnPush
53
54
} )
54
- export class MatMonthView < D > implements AfterContentInit {
55
+ export class MatMonthView < D > extends CalendarView < D > implements AfterContentInit {
55
56
/**
56
57
* The date to display in this month view (everything other than the month and year is ignored).
57
58
*/
@@ -133,6 +134,7 @@ export class MatMonthView<D> implements AfterContentInit {
133
134
@Optional ( ) @Inject ( MAT_DATE_FORMATS ) private _dateFormats : MatDateFormats ,
134
135
@Optional ( ) public _dateAdapter : DateAdapter < D > ,
135
136
@Optional ( ) private _dir ?: Directionality ) {
137
+ super ( ) ;
136
138
if ( ! this . _dateAdapter ) {
137
139
throw createMissingDateImplError ( 'DateAdapter' ) ;
138
140
}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
29
29
ViewChild ,
30
30
ViewEncapsulation ,
31
31
} from '@angular/core' ;
32
+ import { CalendarView } from '@angular/cdk/datepicker' ;
32
33
import { DateAdapter } from '@angular/material/core' ;
33
34
import { Directionality } from '@angular/cdk/bidi' ;
34
35
import { MatCalendarBody , MatCalendarCell } from './calendar-body' ;
@@ -51,7 +52,7 @@ export const yearsPerRow = 4;
51
52
encapsulation : ViewEncapsulation . None ,
52
53
changeDetection : ChangeDetectionStrategy . OnPush
53
54
} )
54
- export class MatMultiYearView < D > implements AfterContentInit {
55
+ export class MatMultiYearView < D > extends CalendarView < D > implements AfterContentInit {
55
56
/** The date to display in this multi-year view (everything other than the year is ignored). */
56
57
@Input ( )
57
58
get activeDate ( ) : D { return this . _activeDate ; }
@@ -119,6 +120,7 @@ export class MatMultiYearView<D> implements AfterContentInit {
119
120
constructor ( private _changeDetectorRef : ChangeDetectorRef ,
120
121
@Optional ( ) public _dateAdapter : DateAdapter < D > ,
121
122
@Optional ( ) private _dir ?: Directionality ) {
123
+ super ( ) ;
122
124
if ( ! this . _dateAdapter ) {
123
125
throw createMissingDateImplError ( 'DateAdapter' ) ;
124
126
}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import {
30
30
ViewChild ,
31
31
ViewEncapsulation ,
32
32
} from '@angular/core' ;
33
+ import { CalendarView } from '@angular/cdk/datepicker' ;
33
34
import { DateAdapter , MAT_DATE_FORMATS , MatDateFormats } from '@angular/material/core' ;
34
35
import { Directionality } from '@angular/cdk/bidi' ;
35
36
import { MatCalendarBody , MatCalendarCell } from './calendar-body' ;
@@ -47,7 +48,7 @@ import {createMissingDateImplError} from './datepicker-errors';
47
48
encapsulation : ViewEncapsulation . None ,
48
49
changeDetection : ChangeDetectionStrategy . OnPush
49
50
} )
50
- export class MatYearView < D > implements AfterContentInit {
51
+ export class MatYearView < D > extends CalendarView < D > implements AfterContentInit {
51
52
/** The date to display in this year view (everything other than the year is ignored). */
52
53
@Input ( )
53
54
get activeDate ( ) : D { return this . _activeDate ; }
@@ -121,6 +122,7 @@ export class MatYearView<D> implements AfterContentInit {
121
122
@Optional ( ) @Inject ( MAT_DATE_FORMATS ) private _dateFormats : MatDateFormats ,
122
123
@Optional ( ) public _dateAdapter : DateAdapter < D > ,
123
124
@Optional ( ) private _dir ?: Directionality ) {
125
+ super ( ) ;
124
126
if ( ! this . _dateAdapter ) {
125
127
throw createMissingDateImplError ( 'DateAdapter' ) ;
126
128
}
You can’t perform that action at this time.
0 commit comments