angular / angular/components

bug(mat-date-picker): the native date adapter can't detect first day of week from user locale

Open
#23,073 7 comments 4 reactions 0 assignees View on GitHub
area: material/datepicker P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Reproduction

All material datepickers display weeks starting Sunday while I have Russia locale set up which demands Monday is the first day of week:

image

Yes, I know I can globally change starting day via DateAdapter but I need to datepickers to be users' locale compatible.

#### Expected Behavior
Monday is first day of week

#### Actual Behavior

Sunday is first day of week.

#### Environment

- Angular: 11.0.3
- CDK/Material: 11.2.4
- Browser(s): Firefox 89
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 11.4

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with Angular Material datepickers and a Russia locale, then inspect the native date adapter and its locale handling. Done means the datepicker displays Monday as the first day of the week for that locale while preserving the existing global DateAdapter override behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.