date picker using 'ar-SA' locale, displayed dates not correct, while value is ok.
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
### Description
I used to use Date Picker with Hijri dates, using native adabter and every thing works fine, after updating to angular 18.1 I got this issue:
* in main.ts => regist SA locale
```
import LocaleSA from '@angular/common/locales/ar-SA';
registerLocaleData(LocaleSA, LanguageEnum.AR);
```
* in app.config.ts => provide native adapter
```
provideNativeDateAdapter(),
{ provide: MAT_DATE_LOCALE, useValue: 'ar-SA' },
```

### Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
### Expected Behavior
I expect to see the correct Hijri date in this case Muharram / محرم first month of Hijri year not Shawal / شوال, and day is 22 not 30
### Actual Behavior
the calendar point at 30/Shawal not 22/Muharram, 30/شوال not 22/محرم
### Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando la registrazione della locale in main.ts e l’adattatore di date nativo e la configurazione di MAT_DATE_LOCALE in app.config.ts. Riproduci il selettore di date con la locale ar-SA, quindi verifica che il mese e il giorno Hijri visualizzati corrispondano al valore selezionato, nello specifico 22 Muharram invece di 30 Shawal.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend, localization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100