Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

Create a React Calendar Component with Events

A practical FullCalendar React tutorial for displaying events, handling dates and time zones, adding recurrence, and checking keyboard accessibility.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a React app that needs calendar views and event interactions, FullCalendar’s React integration is a practical starting point. Install its React package, a view plugin, and the temporal polyfill; then pass event records to the component. The example below covers setup, event rendering, date handling, recurrence, and keyboard access. A custom calendar grid may suit projects that need only a small, tightly controlled view, but it also leaves date logic and interactions to your code.

Install FullCalendar and render a view

FullCalendar’s React guide currently lists @fullcalendar/react and temporal-polyfill as setup dependencies. A calendar also needs at least one plugin that supplies a view. The official guide’s example uses a day-grid plugin; the package names and configuration are documented in the React integration guide.

npm install @fullcalendar/react @fullcalendar/daygrid temporal-polyfill

Import the component and view plugin, then provide the plugin and initial view as props:

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

export default function Calendar() {
  return (
    <FullCalendar
      plugins={[dayGridPlugin]}
      initialView="dayGridMonth"
    />
  )
}

Choose a view plugin that matches the calendar layout your app needs. FullCalendar’s React component accepts calendar options as props; available options and plugins are described in its documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add event data

Each event should at minimum have a title and start. Set end and allDay explicitly when the event’s duration or all-day status matters. An id is useful when your application needs to identify or update a particular event.

const events = [
  {
    id: 'planning',
    title: 'Project planning',
    start: '2026-10-08T10:00:00',
    end: '2026-10-08T11:00:00',
    allDay: false,
  },
  {
    id: 'holiday',
    title: 'Office closed',
    start: '2026-10-12',
    allDay: true,
  },
]

export default function Calendar() {
  return (
    <FullCalendar
      plugins={[dayGridPlugin]}
      initialView="dayGridMonth"
      events={events}
    />
  )
}

These fields follow FullCalendar’s event parsing rules. Extra application-specific fields, such as a category or description, are available to rendering hooks through extendedProps. See Event Parsing for the complete property behavior.

Render custom event content

For JSX content, pass an eventContent callback. The React integration supports JSX from this hook. For example, an event with a category can include a short label in its content:

const events = [
  {
    title: 'Project planning',
    start: '2026-10-08T10:00:00',
    category: 'Team',
  },
]

function renderEventContent(info) {
  return (
    <>
      <strong>{info.event.title}</strong>
      <span> {info.event.extendedProps.category}</span>
    </>
  )
}

<FullCalendar
  plugins={[dayGridPlugin]}
  initialView="dayGridMonth"
  events={events}
  eventContent={renderEventContent}
/>

Use a stable event array and callback if the parent renders frequently. Inline arrays and functions have new identities on each render; for a larger or frequently updated calendar, define data outside the component or use React’s useMemo and useCallback as appropriate. FullCalendar’s React guide explains its reactive props.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle date clicks and server-loaded events

Pass a callback such as dateClick to respond when a user selects a date. The relevant interaction plugin and options depend on the behavior required; consult the FullCalendar documentation for the precise setup. Keep the callback’s date interpretation consistent with the calendar’s configured time zone.

For events stored on a server, use a documented event source rather than assuming the browser already has every record. A function event source can fetch the visible date range, and FullCalendar can request updated data as a user navigates or changes views. Event sources and date navigation are separate capabilities in the documentation.

Get event dates and all-day spans right

FullCalendar treats an event’s start as inclusive and its end as exclusive. An all-day event with a start of September 1 and an end of September 3 therefore covers September 1 and 2, not September 3. If your database stores inclusive end dates, convert them deliberately when creating calendar records.

When allDay is true, time components are ignored. If it is omitted, FullCalendar infers the value: date-only endpoints imply an all-day event, while a time on either endpoint implies a timed event. For timed events, use ISO 8601 date-time strings for both start and end to avoid ambiguity. These rules are detailed in Event Parsing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a time zone intentionally

The timeZone option affects event placement and displayed text, how callback and API dates are interpreted, what date range event sources request, and how strings without a UTC offset are parsed. Decide whether events should follow each user’s browser zone, use UTC consistently, or display in a named region such as America/New_York. FullCalendar documents these consequences in its time zone guide.

Do not treat a date-only value, such as 2026-10-12, as interchangeable with an instant such as 2026-10-12T09:00:00Z. A date-only value describes a calendar date; an instant identifies a moment that can appear on a different local date depending on the selected zone.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Represent recurring schedules

Built-in recurrence covers daily and weekly patterns, with optional time and date bounds. For a weekly schedule, the recurrence fields include daysOfWeek, startTime, endTime, startRecur, and endRecur. The recurrence end bound is exclusive, so an occurrence on that date is not included.

const events = [
  {
    title: 'Team stand-up',
    daysOfWeek: [1, 3, 5],
    startTime: '09:30',
    endTime: '09:45',
    startRecur: '2026-10-01',
    endRecur: '2026-11-01',
  },
]

This models a Monday, Wednesday, and Friday schedule within the stated bounds. For more powerful recurrence rules, FullCalendar documents an RRule connector. Use the Recurring Events guide to choose between simple built-in patterns and the connector; complex exceptions or recurrence conventions should not be assumed to fit the basic fields.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review keyboard and screen-reader behavior

FullCalendar documents WAI-ARIA techniques, descriptive labels, and keyboard focus for interactive elements in its accessibility guide. By default, only events with a url are tabbable. Set eventInteractive when all events should be focusable, and make sure custom event content and handlers have meaningful names and work with a keyboard.

Test the finished interface using keyboard-only navigation and assistive technology. A library’s accessibility guidance does not establish that every custom rendering or interaction in your app is accessible.

Library or custom calendar grid?

FullCalendar documents view plugins, event handling, recurrence options, and event sources, but that does not make it the best choice for every project. Compare the behavior you need with the setup and styling control you want.

  • Choose a library when you need multiple calendar views, event interactions, data sources, or recurring schedules without maintaining all date and navigation logic yourself.
  • Consider a custom grid when the interface is intentionally narrow and bespoke, and your team is prepared to implement date calculations, navigation, event layout, keyboard behavior, and ongoing edge-case maintenance.
  • Check project constraints before committing: dependency and bundle requirements, desired styling, recurrence complexity, data-loading needs, and the accessibility behavior your product requires.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.