Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gcal/outlook like calendar component

License

NotificationsYou must be signed in to change notification settings

Deep-Consulting-Solutions/react-big-calendar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 byFull Calendar.

Use and Setup

yarn add react-big-calendar ornpm install --save react-big-calendar

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

Starters

Run examples locally

$ git clone git@github.com:jquense/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, dependingon your preference of DateTime libraries. You can use either theMoment.js,Globalize.js,date-fns,Day.js localizers.

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

Moment.js

import{Calendar,momentLocalizer}from'react-big-calendar'importmomentfrom'moment'constlocalizer=momentLocalizer(moment)constMyCalendar=(props)=>(<div><Calendarlocalizer={localizer}events={myEventsList}startAccessor="start"endAccessor="end"style={{height:500}}/></div>)

Globalize.js v0.1.1

import{Calendar,globalizeLocalizer}from'react-big-calendar'importglobalizefrom'globalize'constlocalizer=globalizeLocalizer(globalize)constMyCalendar=(props)=>(<div><Calendarlocalizer={localizer}events={myEventsList}startAccessor="start"endAccessor="end"style={{height:500}}/></div>)

date-fns v2

import{Calendar,dateFnsLocalizer}from'react-big-calendar'importformatfrom'date-fns/format'importparsefrom'date-fns/parse'importstartOfWeekfrom'date-fns/startOfWeek'importgetDayfrom'date-fns/getDay'importenUSfrom'date-fns/locale/en-US'constlocales={'en-US':enUS,}constlocalizer=dateFnsLocalizer({  format,  parse,  startOfWeek,  getDay,  locales,})constMyCalendar=(props)=>(<div><Calendarlocalizer={localizer}events={myEventsList}startAccessor="start"endAccessor="end"style={{height:500}}/></div>)

Day.js

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

import{Calendar,dayjsLocalizer}from'react-big-calendar'importdayjsfrom'dayjs'constlocalizer=dayjsLocalizer(dayjs)constMyCalendar=(props)=>(<div><Calendarlocalizer={localizer}events={myEventsList}startAccessor="start"endAccessor="end"style={{height:500}}/></div>)

Custom Styling

Out of the box, you can include the compiled CSS files and be up and running. But, sometimes, you may want to styleBig 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 avariables file containing color and sizing variables that you canupdate to fit your application.Note: Changing and/or overriding styles can cause rendering issues with yourBig Calendar. Carefully test each change accordingly.

Join The Community

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

Translations

About

gcal/outlook like calendar component

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript82.3%
  • MDX14.1%
  • SCSS3.4%
  • Other0.2%

[8]ページ先頭

©2009-2025 Movatter.jp