Reputation: 93
Fullcalendar events can be intercepted by handlres which were passed into object's props:
<FullCalendar
eventDrop={ this.handleInternalDrop }
/>
How to use Fullcalendar methods such as getEvents()? https://fullcalendar.io/docs/Calendar-getEvents
Upvotes: 2
Views: 1461
Reputation: 93
Here is an example of using getEvents() method:
export default class DemoApp extends React.Component {
calendarRef = React.createRef()
render() {
return (
<FullCalendar ref={this.calendarRef} />
)
}
someMethod() {
let calendarApi = this.calendarRef.current.getApi()
calendarApi.getEvents()
}
}
Upvotes: 5