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

Calendar with a locale with Monday as firstDay skips first Monday (like 1 July) #1213

Closed
cbasje opened this issue May 30, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@cbasje
Copy link

cbasje commented May 30, 2024

Describe the bug

When a Calendar is created with a locale that has Mondays as firstDay, such as en-GB, it skips the first day of the month when it is a Monday (when viewing the previous month). You only see this when fixedWeek: true is set as true, otherwise the last row is not rendered, of course.

It is difficult to explain well but I have a reproduction: stackblitz.com/edit/github-qbikvw. If you view June 2024, for example, you will see that the bottom row skips 1 July and shows 2-8 July (even though it should only go until 7 July). Or you can go to August 2025 where you see that the bottom row again skips 1 September.

Edit: this is still a problem with locales that have Sundays as firstDay (see August 2024 with the locale set to 'en-US')

Reproduction

https://stackblitz.com/edit/github-qbikvw?file=src/lib/components/Calendar.svelte

Logs

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 120.80 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.0.0 - ~/.nvm/versions/node/v21.0.0/bin/node
    npm: 10.2.0 - ~/.nvm/versions/node/v21.0.0/bin/npm
    bun: 1.1.7 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 17.4.1
  npmPackages:
    @melt-ui/svelte: ^0.80.0 => 0.80.0
    @sveltejs/kit: ^2.5.2 => 2.5.2
    svelte: ^4.2.12 => 4.2.12

Severity

blocking an upgrade

@huntabyte
Copy link
Member

Closed by #1236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants