Replies: 1 comment 7 replies
-
Hi @devrnt, thanks for proposal! I have not used date-io library, so can you please clarify how localization process would work with different libraries (let's take date-fns and dayjs as examples) – I'm most interested in locales tree shaking part since it is not obvious from date-io docs. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Request
Bring your own date management library: It's not a big deal to have multiple date libraries, I've read #198, but it becomes more "pleasant" and flexible to let the developer choose their own preferred date library. This can also potentially result in appealing to a wider audience.
Let's introduce a
LocalizationProvider
in mantine.dev!Plan of Action
Shipping this feature would result in a breaking change, however, we are able to foresee a fallback (to the current
dayjs
library).I'm heavily inspired by the approach of https://mui.com/ (no need to reinvent the wheel here).
LocationProvider
which takes in a preffered date library adapter as prop, see adapters: https://github.com/dmtrKovalenko/date-io.@mantine/dates
components. These components will make use of the adapter apiI've been doing some work already and I plan to continue working on this feature on condition that you green light.
Also awesome package, kudos!
Beta Was this translation helpful? Give feedback.
All reactions