Skip to content

Commit 52b8fa6

Browse files
committed
fix(native-adapter): native adapter uses locale data
1 parent 2f61895 commit 52b8fa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material/core/datetime/native-date-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import {Platform} from '@angular/cdk/platform';
1010
import {Inject, Injectable, Optional} from '@angular/core';
11+
import {getLocaleFirstDayOfWeek} from '@angular/common';
1112
import {DateAdapter, MAT_DATE_LOCALE} from './date-adapter';
1213

1314
// TODO(mmalerba): Remove when we no longer support safari 9.
@@ -146,8 +147,7 @@ export class NativeDateAdapter extends DateAdapter<Date> {
146147
}
147148

148149
getFirstDayOfWeek(): number {
149-
// We can't tell using native JS Date what the first day of the week is, we default to Sunday.
150-
return 0;
150+
return getLocaleFirstDayOfWeek(this.locale);
151151
}
152152

153153
getNumDaysInMonth(date: Date): number {

0 commit comments

Comments
 (0)