Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fullcalendar/react

fullcalendar2mMIT6.1.17TypeScript support: included

The official React Component for FullCalendar

calendar, event, full-sized, fullcalendar, react

readme

FullCalendar React Component

The official React Component for FullCalendar

Installation

Install the React connector, the core package, and any plugins (like daygrid):

npm install @fullcalendar/react @fullcalendar/core @fullcalendar/daygrid

Usage

Render a FullCalendar component, supplying options as props:

import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'

const events = [
  { title: 'Meeting', start: new Date() }
]

export function DemoApp() {
  return (
    <div>
      <h1>Demo App</h1>
      <FullCalendar
        plugins={[dayGridPlugin]}
        initialView='dayGridMonth'
        weekends={false}
        events={events}
        eventContent={renderEventContent}
      />
    </div>
  )
}

// a custom render function
function renderEventContent(eventInfo) {
  return (
    <>
      <b>{eventInfo.timeText}</b>
      <i>{eventInfo.event.title}</i>
    </>
  )
}

Development

You must install this repo with PNPM:

pnpm install

Available scripts (via pnpm run <script>):

  • build - build production-ready dist files
  • dev - build & watch development dist files
  • test - test headlessly
  • test:dev - test interactively
  • lint
  • clean

changelog

Note

This changelog does not mention all releases. Visit the github releases page as well as the main fullcalendar repo.

6.0.0-beta.3

FIX: content-injection functions not directly accepting jsx (core-7034)

5.11.1 (2022-04-20)

FIX: restore accidentally-removed support for React 17 (#182)

5.11.0 (2022-04-08)

  • support for React 18
  • fix CalendarContent crashes when suspended in concurrent mode (#177)

5.4.0 (2020-11-11)

  • react 17 support
  • better compatibility with Webpack 5, deeming resolve.fullySpecified unnecessary (core-5822)
  • dist files now include a CJS file. ESM is still used by default in most environments (core-5929)

5.2.0 (2020-07-30)

bugfix: dayMinWidth causes error "NowTimer(...): Nothing was returned from render..." (#80)

4.2.0 (2019-06-02)

  • bugfix: if header/footer were specified as object literals, any change to ANY of the FullCalendar component's props would trigger a full rerender.
  • new dependency: fast-deep-equal automatically bundled with UMD dist