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

fix(Calendar): sometimes first day of next month is missing #1236

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

xollaborator
Copy link
Contributor

Solves #1213.

This was solved by me in unovue/radix-vue#1029 but @epr3 suggest you might also need this fix.

Root cause: when 6th week will start in new month then startFrom will be undefined. Currently if (!startFrom) was using first day of next month, but then in creation of extraDaysArray all dates were incremented which resulted in first day of new month being missed.

I am not familliar with Svelte so I do not have any test case for this. But you might want to cross check with how it might be tested in radix-vue: https://github.com/radix-vue/radix-vue/pull/1029/files#diff-a067dd33cc3ddceb2d881b1d1984509071d713079564a97d9ea182084284e2f8

At least using August 2024 instead of January 1980 might help if you are into this, but my conclusion is it most probably will not be worth it, especially from performance perspective.

Copy link

changeset-bot bot commented Jun 23, 2024

🦋 Changeset detected

Latest commit: 8dfeb5a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@melt-ui/svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@TGlide
Copy link
Member

TGlide commented Jun 27, 2024

Thank you!!

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.

2 participants