Skip to content

Commit 7fd7ad3

Browse files
mmalerbajosephperrott
authored andcommitted
fix(datepicker): add back MAT_DATE_LOCALE_PROVIDER (#10602)
1 parent 63f713f commit 7fd7ad3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib/core/datetime/date-adapter.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
import {inject, InjectionToken, LOCALE_ID} from '@angular/core';
1010
import {Observable, Subject} from 'rxjs';
1111

12-
1312
/** InjectionToken for datepicker that can be used to override default locale code. */
1413
export const MAT_DATE_LOCALE = new InjectionToken<string>('MAT_DATE_LOCALE', {
1514
providedIn: 'root',
1615
factory: () => inject(LOCALE_ID)
1716
});
1817

18+
/**
19+
* No longer needed since MAT_DATE_LOCALE has been changed to a scoped injectable.
20+
* If you are importing and providing this in your code you can simply remove it.
21+
* @deprecated
22+
* @deletion-target 7.0.0
23+
*/
24+
export const MAT_DATE_LOCALE_PROVIDER = {provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID};
25+
1926
/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */
2027
export abstract class DateAdapter<D> {
2128
/** The locale to use for all dates. */

0 commit comments

Comments
 (0)