Skip to content

Commit 74cd45a

Browse files
refactor(material/datepicker): expose year view change detector ref (#21499)
1 parent 3484f71 commit 74cd45a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/material/datepicker/year-view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class MatYearView<D> implements AfterContentInit, OnDestroy {
138138
*/
139139
_selectedMonth: number | null;
140140

141-
constructor(private _changeDetectorRef: ChangeDetectorRef,
141+
constructor(readonly _changeDetectorRef: ChangeDetectorRef,
142142
@Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,
143143
@Optional() public _dateAdapter: DateAdapter<D>,
144144
@Optional() private _dir?: Directionality) {

tools/public_api_guard/material/datepicker.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ export declare class MatStartDate<D> extends _MatDateRangeInputBase<D> implement
498498
}
499499

500500
export declare class MatYearView<D> implements AfterContentInit, OnDestroy {
501+
readonly _changeDetectorRef: ChangeDetectorRef;
501502
_dateAdapter: DateAdapter<D>;
502503
_matCalendarBody: MatCalendarBody;
503504
_months: MatCalendarCell[][];

0 commit comments

Comments
 (0)