From 8f7f27f01b8ea0ac1d931649430b9a607acd2d65 Mon Sep 17 00:00:00 2001 From: hamza jazyri Date: Sun, 19 Feb 2023 17:27:45 +0100 Subject: [PATCH] fix(material/datepicker): Resolve issue with MatDatepickerIntl not being picked up in lazy-loaded modules Along the same lines as #12934, where the consumer-provided instance was not being picked up within lazy-loaded modules. The fix also resolves an issue with the close button text when switching to French language in components-examples. fixes #25021 --- tools/public_api_guard/material/datepicker.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/public_api_guard/material/datepicker.md b/tools/public_api_guard/material/datepicker.md index 12cb821f0668..d7680d8e99f9 100644 --- a/tools/public_api_guard/material/datepicker.md +++ b/tools/public_api_guard/material/datepicker.md @@ -48,6 +48,7 @@ import { Observable } from 'rxjs'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; +import { Optional } from '@angular/core'; import { Overlay } from '@angular/cdk/overlay'; import { Portal } from '@angular/cdk/portal'; import { ScrollStrategy } from '@angular/cdk/overlay'; @@ -107,6 +108,16 @@ export type ExtractDateTypeFromSelection = T extends DateRange ? D : // @public export const MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken>; +// @public +export const MAT_DATEPICKER_INTL_PROVIDER: { + provide: typeof MatDatepickerIntl; + deps: Optional[][]; + useFactory: typeof MAT_DATEPICKER_INTL_PROVIDER_FACTORY; +}; + +// @public +export function MAT_DATEPICKER_INTL_PROVIDER_FACTORY(parentIntl: MatDatepickerIntl): MatDatepickerIntl; + // @public export const MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;