Skip to content

fullcalendar/fullcalendar-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a77c926 · Dec 5, 2024
Dec 16, 2022
Jul 12, 2024
Jul 12, 2024
Nov 22, 2022
Nov 22, 2022
Dec 5, 2024
Feb 13, 2024
Nov 22, 2022
Dec 13, 2022
Nov 1, 2022
Nov 22, 2022
Jul 12, 2024
Dec 5, 2024
Jan 31, 2023
Jun 4, 2024

Repository files navigation

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>
    </>
  )
}

Links

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