-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agenda not showing any items if selected date doesnt have an item #2593
Comments
Hey, I was also facing the same issue. I just prompted claude to solve the issue. Now it's working properly. I haven't seen the code properly. Till the time you get proper official answer to this issue. You can use my code below. `const CalendarScreen = () => { const fetchEvents = async () => {
}; const formatEvents = (events: any[]): AgendaSchedule => {
}; useEffect(() => { const handleRefresh = () => { const renderItem = (reservation: CustomAgendaEntry) => { const renderEmptyDate = () => { const keyExtractor = (item: CustomAgendaEntry, index: number) => { if (authLoading) { if (!accessToken) { if (error) { return ( |
@mitej23 i don't want empty dates. I don't want to show anything if there is no event. But I want to show future events. Your solution doesn't work for me. I also don't think it is particularly helpful for others to post (a lot of) code that you didn't even write yourself. It is a lot of clutter with not much value. Your solution boils down to: initialize all days with empty arrays. |
The Agenda doesnt show any items when the currently selected date doesnt have any:
However, when the selected day has an item, it will show all items from this day and all the days after:
I would expect to always show upcoming items even when the current day doesnt have any.
The corresponding code can be found here:
react-native-calendars/src/agenda/reservation-list/index.tsx
Lines 266 to 271 in f6b3281
As you can see the condition checks if there is no item for the selected day and if so, shows the no-data indicator.
I dont think this is correct. The condition should only check if theer are any items in the future and if so, show them. Only if not, it should show the no-data indicator
The text was updated successfully, but these errors were encountered: