render method to another component react full calendar code example

Example 1: fullcalendar react

import interactionPlugin from "@fullcalendar/interaction"; // needed for dayClick

export default class DemoApp extends React.Component {

  render() {
    return (
      <FullCalendar dateClick={this.handleDateClick} plugins={[ dayGridPlugin, interactionPlugin ]} />
    )
  }

  handleDateClick = (arg) => { // bind with an arrow function
    alert(arg.dateStr)
  }

}

Example 2: fullcalendar react

@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';