The type of data stored in the Event class.
The type of metadata stored in the schedule and in this class.
Creates a new event instance given the id, the event paired with the schedule, the schedule, the time span of the event, and the day on the calendar the event belongs to.
The relatively unique identifier of this event.
The event which created this instance.
The time span of this event.
The day on the calendar this event is for.
Whether this event instance was marked as cancelled in the schedule.
The column this event is on in a visual calendar. An event can have its time overlap with another event displaying one of the events in another column. This is only set when Calendar.updateColumns is true or manually set. This value makes sense for visual calendars that are displaying event occurrences at specific times positioned accordingly.
The day this event occurs on.
Whether this event is the last day of an occurrence. A calendar can generate multiple CalendarEvent instances over each day it covers if Calendar.repeatCovers is true. These instances have matching CalendarEvent.id values.
The event with the schedule.
Whether this event is an all day event.
The relatively unique identifier of this event. It is generated based on the index of the schedule in the calendar and the time of day listed in the schedule. This number will no longer be unique if the schedule has more than Constants.MAX_EVENTS_PER_DAY occurrences in a single day (based on number of times in Schedule.times).
Any metadata specified for this event instance in the schedule.
The row this event is on in a visual calendar. An event can span multiple days and it is desirable to have the occurrence on each day to line up. This is only set when Calendar.updateRows is true or manually set. This value makes sense for visual calendars for all day events or when the visual calendar is not positioning events based on their time span.
Whether this event is the first day of an occurrence. A calendar can generate multiple CalendarEvent instances over each day it covers if Calendar.repeatCovers is true. These instances have matching CalendarEvent.id values.
The span of time this event occurs. If this is an all day event this span will start at the beginning of the day and end at the beginning of the next day.
The related event data.
The end timestamp of the event.
Returns a delta value between 0 and 1 which represents where the CalendarEvent.end is relative to CalendarEvent.day. The delta value would be greater than 1 if the end of the event is after CalendarEvent.day.
An IdentifierInput for the start of this event.
The Identifier for this event. Either Identifier.Day or Identifier.Time.
The schedule which generated this event.
The id of the schedule uniqe within the calendar which generated this event.
The start timestamp of the event.
Returns a delta value between 0 and 1 which represents where the CalendarEvent.start is relative to CalendarEvent.day. The delta value would be less than 0 if the start of the event is before CalendarEvent.day.
Changes the cancellation status of this event. By default this cancels
this event - but false
may be passed to undo a cancellation.
Whether the event should be cancelled.
Changes the exclusion status of this event. By default this excludes this
event - but false
may be passed to undo an exclusion.
Whether the event should be excluded.
Calculates the bounds for this event if it were placed in a rectangle which represents a day (24 hour period). By default the returned values are between 0 and 1 and can be scaled by the proper rectangle dimensions or the rectangle dimensions can be passed to this function.
The height of the rectangle of the day.
The width of the rectangle of the day.
The offset in the rectangle of the day to adjust this event by if it intersects or is contained in a previous event. This also reduces the width of the returned bounds to keep the bounds in the rectangle of the day.
true
if the bounds should stay in the day rectangle, false
and the bounds may go outside the rectangle of the day for multi-day
events.
How much to translate the left & right properties by.
How much to translate the top & bottom properties by.
The calculated bounds for this event.
Moves this event to potentially another day and time. A move is accomplished by excluding the current event and adding an inclusion of the new day & time. Any CalendarEvent.meta on this event will be moved to the new event. If the schedule represents a single event (Schedule.isSingleEvent) then the schedule frequencies are updated to match the timestamp provided.
The timestamp to move this event to.
Whether the event was moved to the given time.
Generated using TypeDoc
An instance of an Event on a given day of a Calendar generated by the event's Schedule.