MCPcopy Index your code
hub / github.com/bigcalendar/react-big-calendar

github.com/bigcalendar/react-big-calendar @v1.20.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.20.0 ↗
609 symbols 1,599 edges 280 files 22 documented · 4% 1 cross-repo links
README

react-big-calendar

An events calendar component built for React and designed for modern browsers (read: not IE) and uses flexbox over the classic tables-caption approach.

Big Calendar Demo Image

DEMO and Docs

Inspired by Full Calendar.

Use and Setup

yarn add react-big-calendar or npm install --save react-big-calendar

Include react-big-calendar/lib/css/react-big-calendar.css for styles, and make sure your calendar's container element has a height, or the calendar won't be visible. To provide your own custom styling, see the Custom Styling topic.

Starters

Run examples locally

$ git clone git@github.com:bigcalendar/react-big-calendar.git
$ cd react-big-calendar
$ yarn
$ yarn storybook

Localization and Date Formatting

react-big-calendar includes four options for handling the date formatting and culture localization, depending on your preference of DateTime libraries. You can use either the Moment.js, Globalize.js, date-fns, Day.js localizers.

Regardless of your choice, you must choose a localizer to use this library:

Moment.js

import { Calendar, momentLocalizer } from 'react-big-calendar'
import moment from 'moment'

const localizer = momentLocalizer(moment)

const MyCalendar = (props) => (



    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />



)

Globalize.js v0.1.1

import { Calendar, globalizeLocalizer } from 'react-big-calendar'
import globalize from 'globalize'

const localizer = globalizeLocalizer(globalize)

const MyCalendar = (props) => (



    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />



)

date-fns v2

import { Calendar, dateFnsLocalizer } from 'react-big-calendar'
import format from 'date-fns/format'
import parse from 'date-fns/parse'
import startOfWeek from 'date-fns/startOfWeek'
import getDay from 'date-fns/getDay'
import enUS from 'date-fns/locale/en-US'

const locales = {
  'en-US': enUS,
}

const localizer = dateFnsLocalizer({
  format,
  parse,
  startOfWeek,
  getDay,
  locales,
})

const MyCalendar = (props) => (



    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />



)

Day.js

Note that the dayjsLocalizer extends Day.js with the following plugins:

import { Calendar, dayjsLocalizer } from 'react-big-calendar'
import dayjs from 'dayjs'

const localizer = dayjsLocalizer(dayjs)

const MyCalendar = (props) => (



    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />



)

Custom Styling

Out of the box, you can include the compiled CSS files and be up and running. But, sometimes, you may want to style Big Calendar to match your application styling. For this reason, SASS files are included with Big Calendar.

  @import 'react-big-calendar/lib/sass/styles';
  @import 'react-big-calendar/lib/addons/dragAndDrop/styles'; // if using DnD

SASS implementation provides a variables file containing color and sizing variables that you can update to fit your application. Note: Changing and/or overriding styles can cause rendering issues with your Big Calendar. Carefully test each change accordingly.

Join The Community

Help us improve Big Calendar! Join us on Slack. (Slack invite links do expire. If you can't get in, just file an issue and we'll get a new link.)

Translations

Core symbols most depended-on inside this repo

render
called by 245
src/Month.js
loadStory
called by 93
playwright/helpers/storybook.js
on
called by 54
src/Selection.js
filter
called by 38
src/Selection.js
notify
called by 29
src/utils/helpers.js
getBoundsForNode
called by 20
src/Selection.js
addEventListener
called by 16
src/Selection.js
emit
called by 16
src/Selection.js

Shape

Function 548
Method 31
Class 30

Languages

TypeScript100%

Modules by API surface

src/localizers/luxon.js45 symbols
src/localizers/moment.js43 symbols
src/localizers/dayjs.js43 symbols
src/Selection.js33 symbols
scripts/coverage-check.js18 symbols
src/utils/dates.js16 symbols
src/localizer.js16 symbols
src/utils/TimeSlots.js15 symbols
src/DayColumn.js11 symbols
src/utils/layout-algorithms/overlap.js9 symbols
src/utils/DateSlotMetrics.js9 symbols
src/TimeGrid.js9 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@babel/cli7.29.7 · 1×
@babel/core7.29.7 · 1×
@babel/eslint-parser7.29.7 · 1×
@babel/plugin-transform-class-properties7.29.7 · 1×
@babel/plugin-transform-private-methods7.29.7 · 1×
@babel/plugin-transform-private-property-in-object7.29.7 · 1×
@babel/plugin-transform-runtime7.29.7 · 1×
@babel/preset-env7.29.7 · 1×
@babel/preset-react7.29.7 · 1×
@babel/runtime7.29.7 · 1×
@commitlint/cli21.0.2 · 1×
@commitlint/config-conventional21.0.2 · 1×

For agents

$ claude mcp add react-big-calendar \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact