Skip to content

[pickers] Use the Hijri day token in AdapterMomentHijri normalDateWithWeekday#22972

Merged
LukasTy merged 1 commit into
mui:masterfrom
Anexus5919:fix/hijri-normal-date-with-weekday
Jun 26, 2026
Merged

[pickers] Use the Hijri day token in AdapterMomentHijri normalDateWithWeekday#22972
LukasTy merged 1 commit into
mui:masterfrom
Anexus5919:fix/hijri-normal-date-with-weekday

Conversation

@Anexus5919

@Anexus5919 Anexus5919 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Fixes the Hijri adapter's normalDateWithWeekday format, which used the Gregorian day token DD.

AdapterMomentHijri defined normalDateWithWeekday: 'DD iMMMM'. DD is the Gregorian day-of-month token (not the Hijri iD), so it rendered the Gregorian day, and the format had no weekday despite its name. For 6 Jumada I 1441 (2020-01-01) it produced ٠١ جمادى الأولى (Gregorian day 01) instead of the Hijri ٦.

The fix changes it to 'ddd, iD iMMMM' (short weekday, Hijri day, full Hijri month). This restores the weekday the format name and its JSDoc contract require (@example "Sun, Jan 1"), and matches the sibling non-Gregorian Jalali adapters, whose normalDateWithWeekday is 'EEE, d MMMM' (short weekday, day first, full month).

Impact is low because the toolbar only uses normalDateWithWeekday for English locales and the Hijri adapter is ar-SA (so it falls back to normalDate), but the format is public via adapter.formats.

Closes #22964

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Anexus5919

Copy link
Copy Markdown
Contributor Author

@LukasTy @michelengelen Kindly have a review on this pr. Thanks!

@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22972--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@LukasTy LukasTy added type: bug It doesn't behave as expected. scope: pickers Changes related to the date/time pickers. labels Jun 26, 2026
@LukasTy LukasTy changed the title [pickers] Use the Hijri day token in AdapterMomentHijri normalDateWithWeekday [pickers] Use the Hijri day token in AdapterMomentHijri normalDateWithWeekday Jun 26, 2026

@LukasTy LukasTy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. 🙏

@LukasTy
LukasTy merged commit b68ed31 into mui:master Jun 26, 2026
25 of 26 checks passed
mbrookes pushed a commit to mbrookes/mui-x that referenced this pull request Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: pickers Changes related to the date/time pickers. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pickers] AdapterMomentHijri normalDateWithWeekday uses the Gregorian day token

2 participants