Skip to content

Commit deb149c

Browse files
MichaelJamesParsonsannieyw
authored andcommitted
refactor(material/datepicker): expose year view change detector ref (#21499)
(cherry picked from commit 74cd45a)
1 parent 995ed98 commit deb149c

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
@@ -497,6 +497,7 @@ export declare class MatStartDate<D> extends _MatDateRangeInputBase<D> implement
497497
}
498498

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

0 commit comments

Comments
 (0)