Hijri Calendar Month Starts from Mid-Gregorian Month #2883
meshalkhozai
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m currently using react-day-picker with a custom Hijri (Umm al-Qura) date display on top of the Gregorian calendar.
I understand that DayPicker internally generates the calendar grid based on Gregorian months, while allowing customization of day labels and UI via locales and custom components.
However, when working with Hijri dates, this results in the following behavior:
If a Hijri month (e.g. Safar) starts in the middle of a Gregorian month (e.g. February),
The calendar grid still starts from February 1,
Instead of starting from 1 Safar (the actual beginning of the Hijri month).
This is expected given the current Gregorian-based engine, but I noticed that react-day-picker/persian uses a dedicated calendar build that correctly starts from the beginning of the Persian month.
My questions are:
Is there any supported way (or planned support) to define custom month boundaries or a non-Gregorian calendar engine (such as Hijri)?
Or is the recommended approach to treat Hijri calendars as display-only when using the standard DayPicker build?
I want to confirm whether this behavior is a known and intentional limitation of the library’s design
Beta Was this translation helpful? Give feedback.
All reactions