Skip to main content

EventItem

An event looks like this:

Example Event
const myEvent = {
// Basic fields:
id: 1,
description: 'Event',
startDate: new Date(2021, 3, 15, 12, 0),
endDate: new Date(2021, 3, 15, 12, 30),
color: 'blue',

// Special fields for extra features, e.g.:
style: { borderColor: 'red' },
eventKind: 'block',

// ... your custom fields if needed
}

You can use any custom field you may need, as long as the key does not collide with a basic or special field.

Basic fields

KeyTypeDefaultDescription
idnumber | stringrequiredUnique identifier.
startDateDaterequiredEvent start date.
endDateDaterequiredEvent end date.
descriptionstring""Event description.
colorstringredBox color.

Special fields

There are some fields in the EventItem that provide extra customizations for each event.

KeyTypeDefaultDescription
styleObjectnullExtra style passed to the event container
textStyleObjectnullExtra style passed to the event text. Ignored if EventComponent prop is provided
Interactions
disableDragboolfalseDisables drag-and-drop
disablePressboolfalseDisables onPress
disableLongPressboolfalseDisables onLongPress
Overlap handling
resolveOverlaplane | stack | ignorelaneChoose overlap method for that event
stackKeyStringnullDetermine events it can be stacked with. If is null, it can be stacked with any other event. Only useful if resolveOverlap: stack
Block events
eventKindblock | standardstandardDefines the type of event
All-day events
allDayboolfalseWhether or not is an all-day event