Fullcalendar 事件可以被传递到对象的 props 中的 handlerlres 拦截:
<FullCalendar
eventDrop={ this.handleInternalDrop }
/>
如何使用 getEvents() 等 Fullcalendar 方法? https://fullcalendar.io/docs/Calendar-getEvents
最佳答案
以下是使用 getEvents() 方法的示例:
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()
}
}
关于javascript - 在 React App 中使用 Fullcalendar 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59106610/