angular / angular/components

bug(Date Picker): Date picker display incorrect Hijri dates using 'ar-SA' locale.

Open
#29,540 1 comment 0 reactions 0 assignees View on GitHub
area: material/datepicker P3 regression
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Is this a regression?

- [X] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

^17.0.0

### Description

I used to use Date Picker with Hijri dates, using native adapter and every thing works fine, after updating to angular ^18.1.0 dates not displayed correctly.

"dependencies": {
"@angular/animations": "^18.1.0",
"@angular/cdk": "^18.1.0",
"@angular/common": "^18.1.0",
"@angular/compiler": "^18.1.0",
"@angular/core": "^18.1.0",
"@angular/forms": "^18.1.0",
"@angular/material": "^18.1.3",
"@angular/platform-browser": "^18.1.0",
"@angular/router": "^18.1.0",
"rxjs": "^7.8.1",
"tslib": "^2.5.0",
"zone.js": "~0.14.0"
},

![352843160-1d824c32-7e79-4247-9c3d-79e7c8daf17f](https://github.com/user-attachments/assets/53626c0a-e020-4e98-b6e0-e6e9427c16a4)

### Reproduction

StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-gq9csg?file=src%2Fglobal_styles.scss
Steps to reproduce:
1. open datepicker

### Expected Behavior

to display correct equivalent date in Hijri.

### Actual Behavior

Hijri date displayed inncorect, however value is correct.

### Environment

- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and compare its Angular 18.1/@angular/material behavior with the previously working Angular 17 setup. Trace the native date adapter and ar-SA display path; done means the date picker renders the correct equivalent Hijri date while preserving the already-correct value.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.