Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers] Add support for date-fns v4 #14635

Closed
christopherschroer opened this issue Sep 16, 2024 · 4 comments · Fixed by #14673
Closed

[pickers] Add support for date-fns v4 #14635

christopherschroer opened this issue Sep 16, 2024 · 4 comments · Fixed by #14673
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature

Comments

@christopherschroer
Copy link

christopherschroer commented Sep 16, 2024

Summary

Date-fns v4 has been released

https://blog.date-fns.org/v40-with-time-zone-support/

Pickers only support up to v3

Examples

No response

Motivation

This would allow developers to take advantage of the new time zone features provided by date-fns v4 without worrying about peer-dependency issues

Search keywords: Date-fns

@christopherschroer christopherschroer added new feature New feature or request status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 16, 2024
@christopherschroer christopherschroer changed the title Add support for date-fns v4 [pickers] Add support for date-fns v4 Sep 16, 2024
@LukasTy
Copy link
Member

LukasTy commented Sep 16, 2024

Thank you for creating this issue. 👍
We will be sure to include v4 in the peer dependencies. 😉
As for the timezone support, that is a separate and way bigger topic that we have an issue: #10573 👍

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature and removed new feature New feature or request status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 16, 2024
@LukasTy LukasTy self-assigned this Sep 16, 2024
@flaviendelangle
Copy link
Member

flaviendelangle commented Sep 17, 2024

Wow, I wasn't expecting date-fns@4 before a long time 🤯

@LukasTy are you fine keeping the adapter named AdapterDateFnsV3 until the alpha (where the name imprecision will go away), or do you want to re-export it, something like:

export { AdapterDateFnsV3 } from './AdapterDateFnsV3'
export { AdapterDateFnsV3 as AdapterDateFnsV4 } from './AdapterDateFnV3"

The timezone support should be way easier with the new API, but as Lukas said, it won't come automatically with the update, or at least it will require you to do some workaround that we are not aware of yet. For a good built-in support like the other adapter have, we need to spend time integrating it and making sure everything works correctly.

@LukasTy
Copy link
Member

LukasTy commented Sep 17, 2024

Wow, I wasn't expecting date-fns@4 before a long time 🤯

That's exactly my thoughts. 😆 That's why I didn't even think about another name for the adapter when we introduced it. 🙈

are you fine keeping the adapter named AdapterDateFnsV3 until the alpha (where the name imprecision will go away), or do you want to re-export it, something like:

Yes, I would be completely fine with this compromise, unless we see too much confusion with it, then we can consider re-exporting it aliased. 👌

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

We value your feedback @christopherschroer! How was your experience with our support team?
We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants