Skip to content

docs(translation): Fix wrong import on example #2777

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gonzalosalmeron
Copy link

Pull Request

Thank you for the great library! This PR fixes a naming conflict in the code examples.

What's Changed

  • Resolved variable naming conflicts in documentation examples when importing locales from both react-day-picker/locale and date-fns/locale.

Type of Change

  • Documentation update

Additional Notes

This change improves clarity for developers using both libraries with localized calendars.

Signed-off-by: Gonzalo Salmerón Robles <gonzxlosalmeron@gmail.com>
Copy link
Collaborator

@rodgobbi rodgobbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gonzalosalmeron
Thanks for the PR 👍
But how does this improve documentation?
Removing will hide from developers that the react-day-picker re-exports date-fns/locale for convenience.

@gpbl
Copy link
Owner

gpbl commented Jun 17, 2025

Removing will hide from developers that the react-day-picker re-exports date-fns/locale for convenience.

this is not the first time we get this feedback... but the export has been added in #2474 . Is there something wrong on our side? 🤔

@gonzalosalmeron
Copy link
Author

Hi @gpbl @rodgobbi, thanks for the clarification! 🙏

I totally understand the intention of re-exporting date-fns/locale for convenience — however, after checking the published package, it seems the re-export isn’t actually working as expected.

I couldn’t find date-fns/locale included anywhere in the package (neither in the build output nor in the exports). I’ve attached some screenshots to show what I found — so even though the export was added in #2474 , it doesn’t appear to be accessible to consumers of the package right now.

Happy to help further or suggest a fix if needed! 🚀

image image image

@gonzalosalmeron gonzalosalmeron requested a review from rodgobbi July 16, 2025 17:18
@rodgobbi
Copy link
Collaborator

@gonzalosalmeron, what react-day-picker version are you using in the example?
It should not have a dist/index.js file, and the file structure is not the same since v8.

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.

3 participants