Skip to content

πŸ› Bug Report: ExpandableCalendar incorrectly detects date changed after toggling the calendarΒ #2613

@ucaboro

Description

@ucaboro

Description
When collapsing the calendar into a week and tapping the date it sometimes gets incorrectly detected and moves to a different month.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to e.g. March 2025 and expand the calendar
  2. Tap on a date (e.g. 11th March)
  3. Collapse the calendar
  4. Tap on the same date (e.g. 11th March)

Screenshots / Recording

rnc_bug_report.mov

Code Snippet
For a minimal, reproducible example just use a plain ExpandableCalendar wrapped in a Provider.

<CalendarProvider date={today} showTodayButton={false}>
  <ExpandableCalendar
    disableWeekScroll={true}
    onDayPress={console.log}
    onMonthChange={console.log}
  />
</CalendarProvider>;

Expected Behavior
11th March keep being selected with onDayPress triggered.

Observed Behavior
26th Feb is selected with both onMonthChange and onDayPress being triggered.

Environment (please complete the following information):

"react-native-calendars": "^1.1307.0",
"react-native": "0.74.5",
"expo": "~51.0.38",
Platform: Android & iOS
Device/Emulator: Attached reference from iOS simulator iPhone 13, iOS 15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions