Open ManolisDia opened 7 months ago
you needs to set renderItem props. try this again, for example.
<Agenda
style={{ width: "100%" }}
// loadItemsForMonth={loadItems}
items={items}
renderItem={(item, firstItemInDay) => {
return (
<View style={{ height: item.height }}>
<Text>{item.name}</Text>
</View>
);
}}
/>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
I am trying to create a basic Agenda component, I have a basic list of items, a View with an Agenda component in it and in that view I call that list of items
` import React from 'react'; import { View, Text, StyleSheet, } from 'react-native'; import { Agenda } from 'react-native-calendars';
const ShiftView = () => { // Customize the marked dates as needed
const leftArrowIcon = require('../assets/previous.png'); const rightArrowIcon = require('../assets/next.png');
const items = { '2023-06-25': [ { name: 'Meeting with Team', time: '10:00 AM - 11:30 AM', description: 'Discuss project updates' }, ], '2023-12-16': [ { name: 'Lunch with Client', time: '12:30 PM - 1:30 PM', description: 'Discuss upcoming features' }, { name: 'Project Review', time: '3:00 PM - 4:30 PM', description: 'Review project milestones' }, ], '2023-06-27': [ { name: 'Training Session', time: '2:00 PM - 4:00 PM', description: 'New technology introduction' }, ], };
return (
); };
const styles = StyleSheet.create({ container: { flex: 1, }, });
export default ShiftView; `
Expected Behavior
I expect the items I am calling to appear in the agenda
Observed Behavior
A loading wheel that doesn't go away
No error
Environment
VSCode
Please run these commands in the project folder and fill in their results:
npm ls react-native-calendars
: react-native-calendars@1.1302.0npm ls react-native
: front@1.0.0 C:\Users\Manol\OneDrive\Documents\Uni Year 3\Project\CrewSchedulerPro\Front βββ¬ @react-navigation/drawer@6.6.6 β βββ¬ @react-navigation/elements@1.3.21 β β βββ react-native@0.72.6 deduped β βββ react-native@0.72.6 deduped βββ¬ @react-navigation/native@6.1.9 β βββ react-native@0.72.6 deduped βββ¬ @react-navigation/stack@6.3.20 β βββ react-native@0.72.6 deduped βββ¬ react-native-calendars@1.1302.0 β βββ¬ recyclerlistview@4.2.0 β βββ react-native@0.72.6 deduped βββ¬ react-native-gesture-handler@2.12.1 β βββ react-native@0.72.6 deduped βββ¬ react-native-reanimated@3.3.0 β βββ react-native@0.72.6 deduped βββ¬ react-native-safe-area-context@4.6.3 β βββ react-native@0.72.6 deduped βββ¬ react-native-screens@3.22.1 β βββ react-native@0.72.6 deduped βββ¬ react-native-svg@13.9.0 β βββ react-native@0.72.6 deduped βββ¬ react-native@0.72.6 βββ¬ @react-native/virtualized-lists@0.72.8 βββ react-native@0.72.6 deduped Also specify:Screenshots
Screenshots or gifs of the issue and the suggested fix
will help us move faster with the review process.