how to use fullcalendar in react js code example
Example 1: fullcalendar react
import interactionPlugin from "@fullcalendar/interaction";
export default class DemoApp extends React.Component {
render() {
return (
<FullCalendar dateClick={this.handleDateClick} plugins={[ dayGridPlugin, interactionPlugin ]} />
)
}
handleDateClick = (arg) => {
alert(arg.dateStr)
}
}
Example 2: fullcalendar react
import React from 'react'
import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'
import './main.scss'
export default class DemoApp extends React.Component {
render() {
return (
<FullCalendar defaultView="dayGridMonth" plugins={[ dayGridPlugin ]} />
)
}
}