# Events
The events prop expects an array of objects with the following properties:
Name | Description |
---|---|
start | An ISO8601 timestamp |
end | An ISO8601 timestamp |
color | A hex code that is fed directly into a css style for the color of your event |
user_id | The user's ID that owns the event |
name | The display name of your event |
description | Dispalyed in a smaller font on your event (optional) |
TIP
The entire event object is passed back on the event-click handler, so feel free to include any meta-data you wish to be able to use when the event is clicked.
# Users
The users prop expects an array of objects with the following properties:
Name | Description |
---|---|
id | The user's ID used as a reference for your event's user_id property |
initials | The initials used in the header of the table. You can include more than just the initials, or even include the HTML for a small image here |
# Format
The format of the calendar. Valid values are 'day' or 'week'. Default is week. Month support is planned in the future, but will liekly be limited to showing a single user's schedule at a time.
# StartDate
The starting date of the calendar in YYYY-MM-DD
format. The schedule will make a 'best guess' if this value doesn't align with the given (or default) weekDays options value.
# OpeningTimes
An object with the following properties:
Name | Description |
---|---|
open | The daily opening time of the schedule |
close | The daily closing time of the schedule |
format | The format of the open & close times you provided |
TIP
The default format expected is hhmm
. A list of supported formats is available here
# The Options Object
The options prop is an object that allows the following properties:
Name | Description | Default Value |
---|---|---|
headerHeight | The height of the schedule's header in pixels | 110 |
weekDays | An array with two elements, the first and last day of the week you wish to display, in numerical format | [0 ,5] |
incrementSize | The number of minutes in each drag-selectable increment | 15 |
eventTimeFormat | The format of your event times displayed on the scheduler | hh:mm |
outputFormat | The format of the start/end times on the event-click event. Available formats | moment.js object |
# Event Handling
# event-click
Returns the event object that has been clicked.
# times-selected
Returns an object with start
and end
properties, formatted according to the outputFormat
option. Also includes a user_id
.