From e1f352a86cce360dcc49dd8e564af9c83668459b Mon Sep 17 00:00:00 2001 From: fetis Date: Thu, 28 Jan 2021 16:46:31 +0100 Subject: [PATCH] fix(material/core): native adapter uses locale data --- src/material/core/datetime/native-date-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material/core/datetime/native-date-adapter.ts b/src/material/core/datetime/native-date-adapter.ts index abdaf3cd6db7..1aa7cd44992a 100644 --- a/src/material/core/datetime/native-date-adapter.ts +++ b/src/material/core/datetime/native-date-adapter.ts @@ -8,6 +8,7 @@ import {Platform} from '@angular/cdk/platform'; import {Inject, Injectable, Optional} from '@angular/core'; +import {getLocaleFirstDayOfWeek} from '@angular/common'; import {DateAdapter, MAT_DATE_LOCALE} from './date-adapter'; /** @@ -85,8 +86,7 @@ export class NativeDateAdapter extends DateAdapter { } getFirstDayOfWeek(): number { - // We can't tell using native JS Date what the first day of the week is, we default to Sunday. - return 0; + return getLocaleFirstDayOfWeek(this.locale); } getNumDaysInMonth(date: Date): number {