Warning: Failed prop type: Invalid prop `current` of type `object` supplied to `CalendarListItem`, expected `string`
Agenda warning! I am getting two kinds of errors. one is related to 'CanlendarList' and the other is related to 'CalendarListItem' but I couldn't figure out where the problem is. I would be glad if you help.
1. Warning:
Warning: Failed prop type: Invalid prop `current` of type `object` supplied to `CalendarListItem`, expected `string`
2. Warning:
Failed prop type: Invalid prop `current` of type `object` supplied to `CalendarList`, expected `string`.
import React, { useEffect, useState } from 'react'
import { View, Text, TouchableOpacity } from 'react-native'
import {Calendar, Agenda, LocaleConfig} from 'react-native-calendars';
import {Card} from "react-native-paper";
const Agenta = () => {
const [items, setItems] = useState({});
const loadItems = (day) => {
setTimeout(() => {
for (let i = -15; i < 85; i++) {
const time = day.timestamp + i * 24 * 60 * 60 * 1000;
const strTime = timeToString(time);
if (!items[strTime]) {
items[strTime] = [];
const numItems = Math.floor(Math.random() * 3 + 1);
for (let j = 0; j < numItems; j++) {
items[strTime].push({
name: 'Item for ' + strTime + ' #' + j,
height: Math.max(50, Math.floor(Math.random() * 150)),
});
}
}
}
const newItems = {};
Object.keys(items).forEach((key) => {
newItems[key] = items[key];
});
setItems(newItems);
}, 1000);
};


Environment
npm ls react-native-calendars: [email protected]npm ls react-native: [email protected]
I'm using EXPO
Same, I am having the same issue
Also experiencing this issue after updating packages
I am having the same issue. Can't use agenda in my project.
Same here, I can use but has this error. Idk how to fixed.
I'm experiencing same issue but I still can use the calendar despite this warning.
i also experiencing the same issue it shows the same warning on the initial load.
Non expo have the same issue
I have the same issue while using only Agenda. Agenda works as expected.
Has anyone found a solution?
same error :(
Same
Also getting this warning
Updating the package to latest version solve the problem for me.
Updating the package to latest version solve the problem for me.
Same here.
Paketi en son sürüme güncellemek benim için sorunu çözüyor.
problem solved thanks
facing same issue and calendar is not loading even.