-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Description
Hi. I'm having an issue with the ExpandableCalendar
component. I am using the latest version (1.1313.0).
For some reason, on initial render of my screen the calendar is invisible. On inspect, I can see that the entire ExpandableCalendar
component's opacity
is set to 0
. If I navigate away from the screen and then back, the calendar appears, so it seems to be an issue on the initial render/layout of the screen.
Here is a reproducible example:
import { format } from 'date-fns/esm';
import { Text, View } from 'react-native';
import { CalendarProvider, ExpandableCalendar } from 'react-native-calendars';
import { DayProps } from 'react-native-calendars/src/calendar/day';
import { FlatList } from 'react-native-gesture-handler';
const DummyScreen = () => {
const date = format(new Date(), 'yyyy-MM-dd');
return (
<CalendarProvider date={date}>
<ExpandableCalendar
style={{ opacity: 1 }}
contentContainerStyle={{ opacity: 1 }}
dayComponent={renderDayComponent}
firstDay={1}
/>
<FlatList
renderItem={(i) => (
<View>
<Text style={{ color: '#ffffff' }}>{i.item}</Text>
</View>
)}
data={[1, 2, 3]}
/>
</CalendarProvider>
);
};
function renderDayComponent({ children }: DayProps) {
return <Text style={{ color: '#ffffff' }}>{children}</Text>;
}
export default DummyScreen;
I have also included some screenshots to demonstrate the issue:

Any ideas why this might be happening?
Metadata
Metadata
Assignees
Labels
No labels