An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ception approach.
Inspired by Full Calendar.
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.
$ git clone [email protected]:intljusticemission/react-big-calendar.git
$ cd react-big-calendar
$ yarn
$ yarn examples
react-big-calendar
includes two options for handling the date formatting and culture localization, depending
on your preference of DateTime libraries. You can use either the Moment.js or Globalize.js localizers.
Regardless of your choice, you must choose a localizer to use this library:
import BigCalendar from 'react-big-calendar'
import moment from 'moment'
const localizer = BigCalendar.momentLocalizer(moment)
const MyCalendar = props => (
<div>
<BigCalendar
localizer={localizer}
events={myEventsList}
startAccessor="start"
endAccessor="end"
/>
</div>
)
import BigCalendar from 'react-big-calendar'
import globalize from 'globalize'
const localizer = BigCalendar.globalizeLocalizer(globalize)
const MyCalendar = props => (
<div>
<BigCalendar
localizer={localizer}
events={myEventsList}
startAccessor="start"
endAccessor="end"
/>
</div>
)
Join us on Reactiflux Discord community under the channel #react-big-calendar if you have any questions.