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 #1029

Conversation

xollaborator
Copy link
Contributor

When fixedWeeks is true and next month starts in another row of Calendar first day was missing:
before

After the fix:
after

Fix is quite simple but I've also extended the test case and added a new story for fixedWeeks.

I do not know if you want to have all fixes covered by a test case but taking in to account that on my machine Calendar tests took 15 seconds before and now 2 seconds were added I would personally not merge my test.

I think the new story is also not providing that much value but it helped me test the fix so I included it as well.

Thank you for this library and for shadcn/vue :)

@epr3
Copy link
Collaborator

epr3 commented Jun 23, 2024

Great catch @xollaborator! Thank you for your contribution!👍🏻

This functionality and the date utilities are ported from Melt UI, therefore this fix would help them too.

Here's the corresponding line in Melt UI: https://github.com/melt-ui/melt-ui/blob/42e2dd430c3e13f56062c4d610dabd84ea4e5517/src/lib/internal/helpers/date/calendar.ts#L97

@epr3 epr3 merged commit 3d3e3c9 into radix-vue:main Jun 23, 2024
3 checks passed
@xollaborator
Copy link
Contributor Author

This functionality and the date utilities are ported from Melt UI, therefore this fix would help them too.

Sure, I might try to help them, especially that there is already bug for this issue: melt-ui/melt-ui#1213.

@xollaborator xollaborator deleted the fix/calendar-sometimes-first-day-of-next-month-is-missing branch June 28, 2024 22:48
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.

None yet

2 participants