-
-
Notifications
You must be signed in to change notification settings - Fork 434
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
Development OS: Windows 10 19043.1110
Node version: 16.0.0
Package manager: [email protected]
Reka UI version: 2.0.0
Vue version: 3.0.0
Locale tested: cs-CZ
Nuxt mode: universalLink to minimal reproduction
https://stackblitz.com/edit/c5xh3s73?file=src%2FApp.vue
Steps to reproduce
- Render RangeCalendarRoot or CalendarRoot and pass weekStartsOn=1 and locale='cs-CZ'.
- Observe that the calendar grid starts on Tuesday, not Monday.
- Repeat with weekStartsOn=1 and locale='en-US': calendar starts on Monday as expected.
- This shows weekStartsOn logic does not work correctly for Czech or other non-English locales.
Describe the bug
When weekStartsOn is set to 1 (Monday) and locale is set to cs-CZ, the calendar week starts on Tuesday instead of Monday. This does not happen when locale is en-US.
It appears that week grid calculation internally uses getDayOfWeek(date, locale), which maps weekdays differently based on locale. The week arithmetic should be locale-insensitive: weekStartsOn=1 should always mean Monday, regardless of locale.
Expected behavior
Passing weekStartsOn=1 should always make the week start on Monday, independent of locale. Locale should only affect weekday names, not grid calculation.
Context & Screenshots (if applicable)
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working