Skip to content

Commit

Permalink
fix(material/core): native adapter uses locale data
Browse files Browse the repository at this point in the history
  • Loading branch information
fetis authored and mmalerba committed Nov 28, 2022
1 parent 547357a commit e1f352a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material/core/datetime/native-date-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down Expand Up @@ -85,8 +86,7 @@ export class NativeDateAdapter extends DateAdapter<Date> {
}

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 {
Expand Down

0 comments on commit e1f352a

Please sign in to comment.