Add Support for Custom Calendar Attributes in Dates Components #7276
mnakhli
started this conversation in
Feature requests
Replies: 1 comment
-
To better support non-Gregorian calendars across the entire project, I propose making changes so that the necessary attributes are injected into all components and the main DatesProvider. This approach would ensure that when users need a calendar system other than the Gregorian calendar, the change applies globally throughout the project, rather than having to manually add the required attributes in each individual component. This would simplify the process for developers and ensure consistency across the application, as the non-Gregorian calendar settings would be inherited wherever dates are handled. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dependencies check up
What version of @mantine/* packages do you have in package.json?
Latest
What package has an issue?
@mantine/dates
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
All
Describe the bug
Description:
To enable the implementation of other calendars, it seems that dayjs and its plugins are sufficient. However, the issue lies in the flexibility of certain date-related functions.
If the two functions,
getMonthDays
andisSameMonth
, could be injected into the component as attributes, the problem would be fully resolved.Proposed Solution:
Allow
getMonthDays
andisSameMonth
to be passed as attributes when calling the component. This would make the component more adaptable to different calendar systems without requiring extensive modifications.Benefits:
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service
Beta Was this translation helpful? Give feedback.
All reactions