date picker using 'ar-SA' locale, displayed dates not correct, while value is ok.
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### 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):
Guía de contribución
Línea de trabajo
Comienza revisando el registro de locales en main.ts y el adaptador de fechas nativo y la configuración de MAT_DATE_LOCALE en app.config.ts. Reproduce el selector de fechas con el locale ar-SA y verifica que el mes y el día Hijri mostrados coincidan con el valor seleccionado, específicamente 22 Muharram en lugar de 30 Shawal.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend, localization
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100