Skip to content

RangeCalendar/Calendar weekday headers shift with ZonedDateTime #2022

@newtonyan

Description

@newtonyan

Describe the bug

When using Calendar or RangeCalendar with ZonedDateTime values, weekday headers can shift by one day when the selected timezone is ahead of the local timezone.

This will only occur if you set the value to a value that is not within the current month.

Current month is April, set to a date range in March:

  • Weekday headers shifted and starts with Saturday
  • March 8 become Saturday (It should be a Sunday)
    Image

Current month is March, set to a date range in March:

  • Weekday headers wont shift
  • March 8 is still Sunday
    Image

Reproduction

https://stackblitz.com/edit/tbfyz52p?file=src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 22.22.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.50.2 => 2.56.1 
    bits-ui: 2.17.3 => 2.17.3 
    svelte: ^5.54.0 => 5.55.1

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions