Skip to content

Commit 02b5604

Browse files
author
Tobias Schweizer
committed
fix (MatCalendar): add missin change detection for MatCalendarHeader
1 parent a7975d2 commit 02b5604

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib/datepicker/calendar.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ import {ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal';
4242
changeDetection: ChangeDetectionStrategy.OnPush,
4343
})
4444
export class MatCalendarHeader {
45-
constructor(@Host() public calendar: MatCalendar<any>) {}
45+
constructor(@Host() public calendar: MatCalendar<any>,
46+
private _intl: MatDatepickerIntl,
47+
changeDetectorRef: ChangeDetectorRef) {
48+
49+
this._intlChanges = _intl.changes.subscribe(() => changeDetectorRef.markForCheck());
50+
}
51+
52+
private _intlChanges: Subscription;
4653
}
4754

4855
/**

0 commit comments

Comments
 (0)