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

[Feature]: Allow tree shaking of @internationalized/date #1676

Open
1 of 2 tasks
Solant opened this issue Mar 3, 2025 · 2 comments
Open
1 of 2 tasks

[Feature]: Allow tree shaking of @internationalized/date #1676

Solant opened this issue Mar 3, 2025 · 2 comments

Comments

@Solant
Copy link

Solant commented Mar 3, 2025

Describe the feature

File /packages/core/src/shared/date/comparators.ts imports createCalendar from @internationalized/date package, which leads to all calendars being included in resulting application bundle

Image

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.
@cyyynthia
Copy link
Contributor

Hm, the problem is that the default has to be createCalendar in order to pick the appropriate calendar without requiring people to deal with picking the right impl 😕

Using the Gregorian calendar as a default means locales which use another calendar system won't have the proper calendar show up without additional logic, but at the same time it's right it's a waste to include all calendar systems if only one ends up in use.

Besides a build-time flag I'm unsure this can easily be solved without downgrading i18n handling

@Solant
Copy link
Author

Solant commented Mar 8, 2025

Hey

I'm not sure if locale corresponds with the calendar system (in my opinion Gregorian is somewhat default in any case, but I can be wrong at this one)

Is it possible to use a provider to pass all possible calendar systems and locales?

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

No branches or pull requests

2 participants