Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-big-scheduler

> 前端框架
Open source

A scheduler and resource planning component built for React and made for modern browsers (IE10+)

771 stars0 likes3 views
WebsiteGitHub

About

A scheduler and resource planning component built for React and made for modern browsers (IE10+)

react-big-scheduler

A scheduler and resource planning component built for React and made for modern browsers (IE10+), IE needs babel-polyfill.
From the npm version 0.2.6, Scheduler will use responsive layout by default(set SchedulerData.config.schedulerWidth to a percentage instead of a number).

Online demo

Inspired by Full Calendar Scheduler.

Version selection

  • antd >= 3.9.0 ? [email protected] : [email protected]

Use and Setup

npm install react-big-scheduler --save

…

Run examples locally

  • Clone this repository
  • Retrieve dependencies: npm install
  • Start: npm run example
  • Open http://localhost:8080/example/#/.

If you fail to execute the npm install command, remove the package-lock.json file and try again.

API

1.SchedulerData

SchedulerData is the view model of Scheduler, we can modify it to control the view of the Scheduler.

constructor

javascript
constructor(date=moment().format(DATE_FORMAT), viewType = ViewTypes.Week,
                showAgenda = false, isEventPerspective = false,
                newConfig = undefined, newBehaviors=undefined
                localeMoment = undefined)
  • date is a string in YYYY-MM-DD format, and is the initial date Scheduler will render. Take the date 2017-12-20 for example, Scheduler will render the time window of the week from 2017-12-18 to 2017-12-24 in ViewTypes.Week view type, and will render the time window of the 2017-12 month in ViewTypes.Month view type.
  • viewType is the initial view type, now Scheduler supports Day, Week, Month, Quarter, Year 5 built-in view types, in addition Scheduler now supports Custom, Custom1, Custom2 3 custom view types at the same time, in which you can control the time window yourself, refer to this example. viewType, showAgenda and isEventPerspective are a group which should be contained in the SchedulerData.config.views array, and they together decide which view should be rendered. When showAgenda and isEventPerspective are both false, Scheduler will render the resource view, refer to this example.
  • showAgenda is a bool value, if true, Scheduler will display the agenda view of current view type. Agenda view is read only.
  • isEventPerspective is a bool value, if true, Scheduler will display the task view of current view type. In resource view, every slot(row) describes how many events a resource does in the time window, while in task view, every slot describes how many events a big task is divided into and who will make it done. Add a groupId and groupName property to every event object, so that the events having the same groupId will belong to the same big task and be rendered in the same slot in task view. If groupId and groupName are not provided, SchedulerData will take the id as the groupId, and take the title as the groupName. See the eventsForTaskView in the DemoData.js for details.
  • newConfig is a config object, used to override the default config fully or partly.
  • newBehaviors is a config object, used to override the default behaviors fully or partly.
  • localeMoment is a locale moment object, which is unified used in react-big-scheduler. If not provided, Scheduler will come with English(en, United States) locale strings.

setLocaleMoment

javascript
setLocaleMoment(localeMoment);

Used to set locale moment to the schedulerData, if your locale isn't English. By default, Scheduler comes with English(en, United States)

setResources

javascript
setResources(resources);

Used to set the resources(the slots in resource view), make sure that there are no duplicated resource.id in the resources. See the demo resources in the DemoData.js.

setEvents

javascript
setEvents(events);

Used to set the events. the event array should be sorted in ascending order by event.start property. See the demo events in the DemoData.js. If we use the task view, we'd better add the groupId and the groupName property to each event object, see the eventsForTaskView in the DemoData.js for details.

prev

javascript
prev();

Let the time window scroll to the left once. When SchedulerData,viewType is ViewTypes.Month, the time window will scroll a month, when SchedulerData,viewType is ViewTypes.Week, the time window will scroll a week. SchedulerData.events will be clear after calling this method.

next

javascript
next();

Let the time window scroll to the right once. SchedulerData.events will be clear after calling this method.

setDate

javascript
setDate((date = moment().format(DATE_FORMAT)));

Let the time window jump to the provided date directly. SchedulerData.events will be clear after calling this method.

setViewType

javascript
setViewType(
  (viewType = ViewTypes.Week),
  (showAgenda = false),
  (isEventPerspective = false)
);

Tell SchedulerData to change current view, the viewType, showAgenda and isEventPerspective group should be provided, and should be contained in the SchedulerData.config.views array. SchedulerData.events will be clear after calling this method.

setEventGroups

javascript
setEventGroups(eventGroups);

Used to set the event groups(the slots in task view), make sure that there are no duplicated eventGroup.id in the eventGroups. This method is optional, and is needed only when SchedulerData.eventGroupsAutoGenerated is false.

setEventGroupsAutoGenerated

javascript
setEventGroupsAutoGenerated(autoGenerated);

Tell SchedulerData to generate SchedulerData.eventGroups automatically or not. If true, SchedulerData will generate the event groups(slots) automatically according to the event.groupId and 'event.groupName' automatically. If groupId and 'groupName' are not provided, SchedulerData will take event.id and event.title instead.

setMinuteStep

javascript
setMinuteStep(minuteStep);

Used to set minute step for daily view and refresh the render data.

toggleExpandStatus

javascript
toggleExpandStatus(slotId);

Used to toggle slot's(and its children's) expand status.

getMinuteStepsInHour

javascript
getMinuteStepsInHour();

Used to get minute steps in an hour, it equals 60 / SchedulerData.config.minuteStep.

addResource

javascript
addResource(resource);

Add the resource to the SchedulerData.resources, make sure that resource.id is not duplicated. Refer to this example.

addEventGroup

javascript
addEventGroup(eventGroup);

Add the eventGroup to the SchedulerData.eventGroups, make sure that eventGroup.id is not duplicated. Please note that the eventGroup added may be override when SchedulerData.eventGroupsAutoGenerated is true and SchedulerData.eventGroups is auto-generated.

addEvent

javascript
addEvent(newEvent);

Add the newEvent to the SchedulerData.events, make sure that newEvent.id is not duplicated. SchedulerData will place the newEvent in the right index according to the newEvent.start property.

updateEventStart

javascript
updateEventStart(event, newStart);

Update the newStart to the event.start, newStart is a string in YYYY-MM-DD HH:mm:ss format(similarly hereinafter). SchedulerData will replace the event in the right index according to the newStart value.

updateEventEnd

javascript
updateEventEnd(event, newEnd);

Update the newEnd to the event.end.

moveEvent

javascript
moveEvent(event, newSlotId, newSlotName, newStart, newEnd);

Update the newSlotId, newSlotName, newStart, newEnd of the event. In resource view, new slot is a resource, while in task view, new slot is a event group. SchedulerData will replace the event in the right index according to the newStart value.

removeEvent

javascript
removeEvent(event);

Remove the given event from SchedeulerData.events.

removeEventById

javascript
removeEventById(eventId);

Remove event from SchedeulerData.events by the given event id.

getSlots

javascript
getSlots();

Returns the slot array, SchedulerData.resources in resource view, SchedulerData.eventGroups in task view.

getSlotById

javascript
getSlotById(slotId);

Returns the slot by slotId, returns undefined if not found.

getResourceById

javascript
getResourceById(resourceId);

Returns the resource by resourceId, returns undefined if not found.

isEventInTimeWindow

javascript
isEventInTimeWindow(eventStart, eventEnd, windowStart, windowEnd);

Returns whether an event is in the time window or not, remind that eventStart, eventEnd, windowStart, windowEnd are all moment objects.

2.Locale support(Refer to this example for details.)

SchedulerData.config.resourceName

The locale string of resource name.

SchedulerData.config.taskName

The locale string of task name.

SchedulerData.config.agendaViewHeader

The locale string of agenda view header.

SchedulerData.config.addMorePopoverHeaderFormat

The locale string of add more popover header format.

SchedulerData.config.eventItemPopoverDateFormat

The locale string of event item popover date format.

SchedulerData.config.nonAgendaDayCellHeaderFormat

The locale string of non-agenda view cell header format of day view type.

SchedulerData.config.nonAgendaOtherCellHeaderFormat

The locale string of non-agenda view cell header format of other view types.

SchedulerData.behaviors.getDateLabelFunc

Used to resolve the locale string of date label of Scheduler component.(Refer to the getDateLabel func for example)

3.SchedulerData.config(See the config.js for details.)

schedulerWidth

The width of Scheduler. If schedulerWidth is a number, Scheduler will use fixed width layout, while if schedulerWidth is a percentage, Scheduler will use responsive layout. And in the responsive layout: actual width of Scheduler = (SchedulerData.documentWidth - SchedulerData.config.besidesWidth) * SchedulerData.config.schedulerWidth SchedulerData.documentWidth is the window width of browser and will change automatically when resized.

schedulerMaxHeight

The max height of Scheduler. If the desired height is bigger than the max height, the header row of Scheduler will be frozen and vertical scroll bar will appear, but this won't happen when the max height is set to 0. Refer to this example.

tableHeaderHeight

Height of Scheduler table header.

agendaResourceTableWidth

Width of the left Scheduler resource column in agenda view.

agendaMaxEventWidth

Max width of an event item in agenda view.

dayResourceTableWidth, weekResourceTableWidth, monthResourceTableWidth, yearResourceTableWidth, quarterResourceTableWidth

Width of the left Scheduler resource column in resource view and task view of different view types.

dayCellWidth, weekCellWidth, monthCell

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptmodern-browsersreactscheduler

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架