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

Migrate to date-fns v3 #349

Merged
merged 6 commits into from
Apr 14, 2024
Merged

Migrate to date-fns v3 #349

merged 6 commits into from
Apr 14, 2024

Conversation

aldabil21
Copy link
Owner

@aldabil21 aldabil21 commented Apr 10, 2024

To be able use date-fns v3

  1. Should be minimum @mui/x-date-pickers@6.19.0 & date-fns@3.2.0 ref
  2. Must pass prop dateAdapter imported from @mui/x-date-pickers/AdapterDateFnsV3

Closes #347

@kraffi83
Copy link

kraffi83 commented Apr 10, 2024

Hello @aldabil21 ,
If you're already updating packages, why not to the latest version?
"@mui/x-date-pickers": "^7.1.1",
"date-fns": "^3.6.0",

Only MUI X v7.0.0 Support for date-fns v3.
Best regards

@aldabil21
Copy link
Owner Author

Hello @aldabil21 , If you're already updating packages, why not to the latest version? "@mui/x-date-pickers": "^7.1.1", "date-fns": "^3.6.0",

Only MUI X v7.0.0 Support for date-fns v3. Best regards

The dependencies selected here are the minimum allowed version. Which are set in peerDependency.
Upgrading to latest is optional, and should be done for testing purposes as well

@aldabil21 aldabil21 changed the title Migrate to AdapterDateFnsV3 Support date-fns v3 Apr 10, 2024
@aldabil21 aldabil21 changed the title Support date-fns v3 Migrate to date-fns v3 Apr 14, 2024
@aldabil21 aldabil21 merged commit 1b59230 into master Apr 14, 2024
@aldabil21 aldabil21 deleted the 347-date-fns-v3 branch April 14, 2024 06:45
@aldabil21
Copy link
Owner Author

I decided to go with migrating to v3 instead of supporting both
if mui team kept the previous export of the adapter, would have made more sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for date-fns v3
2 participants