I have built an in app calendar using react-native calendar, and I want the user to be able to add or delete appointments to the calendar, but cannot figure this part out. The user will be allowed to schedule up to a week in advance. How should I go about this?
Here is my code that generates the calendar:
import { Calendar, CalendarList, Agenda } from 'react-native-calendars';
const ScheduleScreen = ({navigation}) => {
const numWeeks = 1
const weekAhead = new Date; weekAhead.setDate(weekAhead.getDate()+ numWeeks * 7)
const [ item, setItem ] = useState({});
return(
....
<Agenda
onDayPress = {(day)=>console.log('Day changed')}
minDate = {new Date()}
maxDate = {weekAhead}
pastScrollRange = {0}
futureScrollRange = {0}
items = {{
'new Date()': [],
weekAhead: [],
}}
/>
....
)
}