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
Key | Type | Default | Description |
---|---|---|---|
id | number | string | required | Unique identifier. |
startDate | Date | required | Event start date. |
endDate | Date | required | Event end date. |
description | string | "" | Event description. |
color | string | red | Box color. |
Special fields
There are some fields in the EventItem
that provide extra customizations for each event.
Key | Type | Default | Description |
---|---|---|---|
style | Object | null | Extra style passed to the event container |
textStyle | Object | null | Extra style passed to the event text. Ignored if EventComponent prop is provided |
Interactions | |||
disableDrag | bool | false | Disables drag-and-drop |
disablePress | bool | false | Disables onPress |
disableLongPress | bool | false | Disables onLongPress |
Overlap handling | |||
resolveOverlap | lane | stack | ignore | lane | Choose overlap method for that event |
stackKey | String | null | Determine events it can be stacked with. If is null , it can be stacked with any other event. Only useful if resolveOverlap: stack |
Block events | |||
eventKind | block | standard | standard | Defines the type of event |
All-day events | |||
allDay | bool | false | Whether or not is an all-day event |