Skip to content

Daylight savings time breaks create events #248

@jinsley8

Description

@jinsley8

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

When a user creates an event on the calendar and drags to extend it, the event jumps to the previous day.

Root cause: March 8, 2026 is DST (Daylight Savings Time) spring forward. The calendar library uses a fixed MILLISECONDS_IN_DAY (86400000ms) constant for day-index arithmetic in its drag handlers.

When the visible calendar week spans the DST transition (Sunday March 8 is in the calendar view), the spring-forward day is only 23 hours, causing Math.floor() to compute the wrong day index (3 instead of 4), shifting events back by one day.

Library version

2.5.6

Environment info

System:
  OS: macOS 15.7.3
  CPU: (10) arm64 Apple M1 Pro
  Memory: 108.59 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.16.0
    path: /Users/me/.nvm/versions/node/v22.16.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.9.2
    path: /Users/me/.nvm/versions/node/v22.16.0/bin/npm
  Watchman:
    version: 2026.03.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/me/.local/share/mise/installs/ruby/3.4.5/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK:
    API Levels:
      - "35"
      - "36"
    Build Tools:
      - 35.0.0
      - 35.0.1
      - 36.0.0
    System Images:
      - android-35 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-36.1 | Google APIs ARM 64 v8a
      - android-36.1 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.27397.103.2522.14514259
  Xcode:
    version: 26.3/17C529
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.18
    path: /usr/bin/javac
  Ruby:
    version: 3.4.5
    path: /Users/me/.local/share/mise/installs/ruby/3.4.5/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to reproduce

  1. Start calendar where March 8 2026 is within the calendar view
  2. Allow users to tap and drag to create events
  3. The tap adds the event correctly but as soon as you drag the event moves to the previous day but forward 1 hour.

Reproducible example repository

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions