react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

CalendarList initialDate not scrolling and replacing all months

Open cruzms opened this issue 1 year ago • 7 comments

Description

When initialDate prop is set to CalendarList all visible months change to the initial

Expected Behavior

The months list should display correctly

Observed Behavior

image

Environment

Please run these commands in the project folder and fill in their results:

Also specify:

  1. Device/emulator/simulator & OS version:

Emulator: 8_Fold-out_API_30 Device: Redmi Note 7 Android 10

Reproducible Demo

import React from "react";
import { CalendarList } from "react-native-calendars";

export default function CalendarTest() {
  return (
    <CalendarList
      initialDate="2024-08-11"
      markedDates={{
        "2024-08-10": { selected: true },
      }}
      onDayPress={(e) => {
        console.log(e);
      }}
    />
  );
}

Screenshots

https://github.com/wix/react-native-calendars/assets/31360984/fe8ba7ee-87ba-4bfa-81c3-0b6745fb3f8d

cruzms avatar May 07 '24 18:05 cruzms

I have same problem. I found this in the code, but I didn't understand what affects this 'visible' parameter:

react-native-calendars/src/calendar-list/item.js image

donPindyukel avatar May 28 '24 09:05 donPindyukel

I'm also having this issue.

bradbyte avatar Jul 18 '24 17:07 bradbyte