From 7fd7ad3ab28079b35778b01e382be43af94eebc1 Mon Sep 17 00:00:00 2001 From: mmalerba Date: Thu, 29 Mar 2018 11:14:30 -0700 Subject: [PATCH] fix(datepicker): add back MAT_DATE_LOCALE_PROVIDER (#10602) --- src/lib/core/datetime/date-adapter.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/core/datetime/date-adapter.ts b/src/lib/core/datetime/date-adapter.ts index 1c8083bae94..3859207f6ec 100644 --- a/src/lib/core/datetime/date-adapter.ts +++ b/src/lib/core/datetime/date-adapter.ts @@ -9,13 +9,20 @@ import {inject, InjectionToken, LOCALE_ID} from '@angular/core'; import {Observable, Subject} from 'rxjs'; - /** InjectionToken for datepicker that can be used to override default locale code. */ export const MAT_DATE_LOCALE = new InjectionToken('MAT_DATE_LOCALE', { providedIn: 'root', factory: () => inject(LOCALE_ID) }); +/** + * No longer needed since MAT_DATE_LOCALE has been changed to a scoped injectable. + * If you are importing and providing this in your code you can simply remove it. + * @deprecated + * @deletion-target 7.0.0 + */ +export const MAT_DATE_LOCALE_PROVIDER = {provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID}; + /** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */ export abstract class DateAdapter { /** The locale to use for all dates. */