Skip to content

date picker using 'ar-SA' locale, displayed dates not correct, while value is ok. #29500

Open
@DevAliMaher

Description

@DevAliMaher

Is this a regression?

  • 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' },

image

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):

Activity

amysorto

amysorto commented on Jul 30, 2024

@amysorto
Contributor

Can you provide a Stackblitz of your example?

added
needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bug
i18nThis issue is related to internationalization
and removed
needs triageThis issue needs to be triaged by the team
on Jul 30, 2024
removed
needs: clarificationThe issue does not contain enough information for the team to determine if it is a real bug
on Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @amysorto@mmalerba@DevAliMaher

        Issue actions

          date picker using 'ar-SA' locale, displayed dates not correct, while value is ok. · Issue #29500 · angular/components