Fullcalendar
(part of package 'Fullcalendar Component') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
styleClass
Type: styleclass
themeSystem
Type: string Default Value: "standard"
tooltipExpression
Type: tagstring
The text expression to be shown as a tooltip when hovering on the calendar events. Use double curly brackets to evaluate {{propertyName}} the event's properties
Example
Events
onDateClickMethodID
onDateClickMethodID will be called when the user clicks on a date or a time.
Parameters:
date date dateStr string dayEl object jsEvent JSEvent view ViewType resource ResourceObject
onDateDblClickMethodID
onDateClickMethodID will be called when the user double clicks on a date or a time.
Parameters:
date date dateStr string dayEl object jsEvent JSEvent view ViewType resource ResourceObject
onDatesSetMethodID
onDatesSetMethodID will be called after the calendar’s date range has been initially set or changed in some way and the DOM has been updated.
Parameters:
start date end date startStr string endStr string timeZone string view ViewType
onDropMethodID
onDropMethodID will be called when an external draggable element or an event from another calendar has been dropped onto the calendar.
Parameters:
allDay boolean date date dateStr string draggedElement object jsEvent JSEvent resource ResourceObject view ViewType
onEventAddMethodID
onEventAddMethodID will be called after an event has been added to the calendar.
@return {boolean}if it returns false, the event add action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[]
Returns: boolean
onEventChangeMethodID
onEventChangeMethodID will be called after an event has been modified in some way.
@return {boolean}if it returns false, the event change action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject oldEvent EventObject relatedEvents EventObject[]
Returns: boolean
onEventClickMethodID
onEventClickMethodID will be called when the user clicks an event.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventDblClickMethodID
onEventDblClickMethodID will be called when the user dbl click an event.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventDragStartMethodID
onEventDragStartMethodID will be called when event dragging begins.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventDragStopMethodID
onEventDragStopMethodID will be called when event dragging stops.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventDropMethodID
onEventDropMethodID will be called when dragging stops and the event has moved to a different day/time.
@return {boolean}if it returns false, the event drop action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[] oldEvent EventObject oldResource ResourceObject newResource ResourceObject delta int jsEvent JSEvent view ViewType
Returns: boolean
onEventLeaveMethodID
onEventLeaveMethodID will be called when on a calendar when one if its events is about to be dropped onto another calendar.
@return {boolean}if it returns false, the event leave action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[] draggedElement object view ViewType
Returns: boolean
onEventMouseEnterMethodID
onEventMouseEnterMethodID will be called when the user mouses over an event. Similar to the native mouseenter.
Parameters:
element object eventObject EventObject jsEvent JSEvent view ViewType
onEventMouseLeaveMethodID
onEventMouseLeaveMethodID will be called when the user mouses out of an event. Similar to the native mouseleave.
Parameters:
element object event EventObject jsEvent JSEvent view ViewType
onEventReceiveMethodID
onEventReceiveMethodID will be called when an external draggable element with associated event data was dropped onto the calendar. Or an event from another calendar.
@return {boolean}if it returns false, the event receive action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[] draggedElement object view ViewType
Returns: boolean
onEventRemoveMethodID
onEventRemoveMethodID will be called after an event has been removed from the calendar.
@return {boolean}if it returns false, the event remove action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[]
Returns: boolean
onEventResizeMethodID
onEventResizeMethodID will be called when resizing stops and the event has changed in duration.
@return {boolean}if it returns false, the event resize action will be reverted, otherwise (true) the action is considered valid
Parameters:
event EventObject relatedEvents EventObject[] oldEvent EventObject endDateDelta int startDateDelta int jsEvent JSEvent view ViewType
Returns: boolean
onEventResizeStartMethodID
onEventResizeStartMethodID will be called when event resizing begins.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventResizeStopMethodID
onEventResizeStopMethodID will be called when event resizing stops.
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventRightClickMethodID
Parameters:
event EventObject jsEvent JSEvent view ViewType
onEventsSetMethodID
onEventsSetMethodID will be called after event data is initialized OR changed in any way.
Parameters:
events EventObject[]
onLoadingMethodID
onLoadingMethodID will be called when event or resource fetching starts/stops.
Parameters:
isLoading boolean
onNavLinkDayClickMethodID
onNavLinkDayClickMethodID when navLinks setting is true, will be called when the user clicks on a day. onDateClickMethodID will not be called in this scenario.
Parameters:
onNavLinkWeekClickMethodID
onNavLinkWeekClickMethodID when navLinks setting is true, will be called when the user clicks on a week.
Parameters:
onResourceAddMethodID
onResourceAddMethodID will be called after a resource has been added to the calendar.
@return {boolean}if it returns false, the resource add action will be reverted, otherwise (true) the action is considered valid
Parameters:
resource ResourceObject
Returns: boolean
onResourceChangeMethodID
onResourceChangeMethodID will be called after a resource has been modified in some way.
@return {boolean}if it returns false, the resource change action will be reverted, otherwise (true) the action is considered valid
Parameters:
oldResource ResourceObject newResource object
Returns: boolean
onResourceRemoveMethodID
onResourceRemoveMethodID will be called after a resource has been removed from the calendar.
@return {boolean}if it returns false, the resource remove action will be reverted, otherwise (true) the action is considered valid
Parameters:
resource ResourceObject
Returns: boolean
onResourcesSetMethodID
onResourcesSetMethodID will be called after resource data is initialized OR changed in any way.
Parameters:
resources ResourceObject[]
onSelectMethodID
onSelectMethodID will be called when a date/time selection is made.
Parameters:
start date end date startStr string endStr string allDay boolean jsEvent JSEvent view ViewType resource ResourceObject
onUnselectMethodID
onUnselectMethodID will be called when the current selection is cleared.
Parameters:
onViewDidMountMethodID
onViewDidMountMethodID will be called right after the view has been added to the DOM.
Parameters:
view ViewType
onViewWillUnmountMethodID
onViewWillUnmountMethodID will be called right before the view will be removed from the DOM.
Parameters:
view ViewType
onWindowResizeMethodID
onWindowResizeMethodID will be called after the calendar’s dimensions have been changed due to the browser window being resized.
Parameters:
view ViewType
API
addEvent
Adds an event to calendar.
@param {EventParsing} event @param {Object} source @return {EventObject}
Parameters:
event EventParsing source object (optional)
Returns: EventObject
addEventSource
Dynamically adds an event source.
@param {EventSource} source
Parameters:
source FunctionEventSource
addResource
Allows programmatic rendering of a new resource on the calendar after the initial set of resources has already been displayed.
@param {ResourceObject} resource @param {Boolean} [scrollTo]
Parameters:
resource ResourceObject scrollTo boolean (optional)
batchRendering
A way to group operations that cause rerenders.
@param {Function} func
Parameters:
func function
changeView
Gets the View Object for the current view.
@param {String} viewName @param {Object} [dateOrRange]
Parameters:
destroy
Restores the container element to the state before FullCalendar was initialized.
formatDate
A method that formats a date into a string. It inherits the locale and time zone settings of the calendar it’s called on.
@param {Object} date @param {Object} settings @returns {String}
Parameters:
Returns: string
formatIso
Formats a date into an ISO8601 string. Outputs a UTC offset appropriate to the calendar it’s called on.
@param {Object} date @param {Boolean} [omitTime] @returns {String}
Parameters:
Returns: string
formatRangeCalendar
Formats two dates, a start and an end, into a string.
settings is an object that holds any of the date format config options. It also accepts the following additional properties: separator — what will be inserted between the two dates. a ' - ' by default isExclusive — if true, the given end date will be considered the exclusive end of the range, meaning date just before the end will be rendered instead. Useful if you need to format an exclusive-end whole-day range.
@param {Object} start @param {Object} end @param {Object} settings @returns {String}
Parameters:
Returns: string
formatRangeEvent
Formats an event’s dates into a string.
Accepts a date formatter.
If the event doesn’t have an end, then the start will be formatted alone.
@param {String} eventID @param {Object} formatConfig
Parameters:
fullCalendar
Parameters:
calendarOptions FullCalendarOptions renderOnCurrentView boolean (optional)
getCalendarEvents
Getter for all calendar events.
@return {Array<EventObject>}
Returns: EventObject[]
getChildren
Returns a list of a resource’s child resources.
@param {String} id @returns {Array<ResourceObject>}
Parameters:
id string
Returns: ResourceObject[]
getDate
Returns a Date for the current date of the calendar.
@returns {Date}
Returns: date
getEventById
Gets a calendar event using a given ID.
@param {String} id @return {EventObject}
Parameters:
id string
Returns: EventObject
getEventResources
Gets the Resources associated with the given event.
@param {String} eventID @returns {Array<ResourceObject>}
Parameters:
eventID string
Returns: ResourceObject[]
getEventSourceById
Retrieves a specific Event Source Object.
@param {String} eventID @returns {EventSource}
Parameters:
id string
Returns: EventSource
getEventSources
Retrieves all Event Source Objects.
@returns {Array<EventSource>}
Returns: EventSource[]
getFullCalendarOptions
Returns: FullCalendarOptions
getOption
Gets the value of an option from the calendar.
@param {String} name @returns {Object}
Parameters:
name string
Returns: object
getParent
Returns the parent Resource of a child resource.
@param {String} id @returns {ResourceObject}
Parameters:
id string
Returns: ResourceObject
getResourceById
A method that retrieves a specific Resource Object in memory.
@param {Object} resourceId @returns {ResourceObject}
Parameters:
resourceId object
Returns: ResourceObject
getResourceEvents
Gets the Resources associated with the given event.
@param {String} id @returns {Array<ResourceObject>}
Parameters:
id string
Returns: ResourceObject[]
getResources
A method that retrieves all Resources, including children, as a single flat list.
@returns {Array<ResourceObject>}
Returns: ResourceObject[]
getTopLevelResources
A method that retrieves only top-level Resources.
@returns {Array<ResourceObject>}
Returns: ResourceObject[]
getView
Gets the View Object for the current view.
@returns {ViewType}
Returns: ViewType
gotoDate
Moves the calendar to an arbitrary date.
@param {Date} date
Parameters:
date date
incrementDate
Moves the calendar forward/backward an arbitrary amount of time.
@param {Object} delta
Parameters:
delta object
moveDates
Will move an event’s start and end dates by a specific period of time.
@param {String} eventID @param {Object} delta
Parameters:
moveEnd
Will move an event’s end date by a specific period of time.
@param {String} eventID @param {Object} delta
Parameters:
moveStart
Will move an event’s start date by a specific period of time.
@param {String} eventID @param {Object} delta
Parameters:
next
Moves the calendar one step forward (by a month or week for example).
If the calendar is in dayGridMonth view, will move the calendar forward one month. If the calendar is in dayGridWeek or timeGridWeek, will move the calendar forward one week. If the calendar is in dayGridDay or timeGridDay, will move the calendar forward one day.
nextYear
Moves the calendar forward one year.
prev
Moves the calendar one step back (by a month or week for example).
If the calendar is in dayGridMonth view, will move the calendar back one month. If the calendar is in dayGridWeek or timeGridWeek, will move the calendar back one week. If the calendar is in dayGridDay or timeGridDay, will move the calendar back one day.
prevYear
Moves the calendar back one year.
refetchEventSource
Refetches events from all sources and rerenders them on the screen.
@param {String} eventSourceID
Parameters:
eventSourceID string
refetchEvents
Refetches events from all sources and rerenders them on the screen.
refetchResources
Causes the resource data to be fetched and freshly rerendered.
removeEvent
Removes an event from the calendar.
@param {String} eventID
Parameters:
eventID string
removeEventSource
Removes all events associated with this source and prevents it from being fetched again.
@param {String} eventSourceID
Parameters:
eventSourceID string
removeResource
Programmatically removes a resource from the calendar.
@param {String} id
Parameters:
id string
render
Will initially render a calendar, or if it is already rendered, will rerender it.
scrollToTime
Programatically scroll the current view to the given time.
@param {Object} durationInput
Parameters:
durationInput object
select
A method for programmatically selecting a period of time.
@param {Object} dateOrObj @param {Object} [endDate]
Parameters:
setAllDay
Sets whether an event is considered all-day.
@param {String} eventID @param {Boolean} allDay @param {Object} [settings]
Parameters:
setDates
Sets an event’s start date, end date, and allDay properties at the same time.
@param {String} eventID @param {Object} start @param {Object} end @param {Object} [options]
Parameters:
eventID string start object end object options object (optional)
setEnd
Sets an event’s end date.
@param {String} eventID @param {Object} date
Parameters:
setEventResources
Sets the Resources associated with the given event.
@param {String} eventID @param {Array<ResourceObject>} resources
Parameters:
eventID string resources ResourceObject[]
setExtendedPropEvent
Modifies a single property in an events' extendedProps hash.
@param {String} eventID @param {String} name @param {Object} value
Parameters:
setExtendedPropResource
Modifies a single property in an Resource Object’s extendedProps hash.
@param {String} id @param {String} name @param {Object} value
Parameters:
setOption
Sets an option for the calendar.
@param {String} name @param {Object} value
Parameters:
setPropEvent
Modifies any of the non-date-related properties of an event.
@param {String} eventID @param {String} name @param {Object} value
Parameters:
setPropResource
Modifies any of the properties of a Resource Object.
@param {String} id @param {String} name @param {Object} value
Parameters:
setStart
Sets an event’s start date.
@param {String} eventID @param {Object} date @param {Object} [options]
Parameters:
toPlainObjectEvent
Serializes an Event API Object to a plain object.
@param {String} eventID @param {Object} [settings]
Parameters:
toPlainObjectResource
Serializes a Resource API Object to a plain object.
@param {String} id @param {Object} [settings]
Parameters:
today
Moves the calendar to the current date.
unselect
A method for programmatically clearing the current selection.
updateFullCalendar
Parameters:
Types
ArrayEventSource
allDayDefault
Type: boolean
allow
Type: object
backgroundColor
Type: color
borderColor
Type: color
className
Type: string[]
color
Type: color
constraint
Type: object
data
Type: object
defaultAllDay
Type: boolean
display
Type: string
durationEditable
Type: boolean
editable
Type: boolean
eventDataTransform
Type: object
events
Type: EventObject[]
failure
Type: object
format
Type: string
id
Type: object
overlap
Type: boolean
startEditable
Type: boolean
success
Type: object
textColor
Type: color
url
Type: string
EventObject
allDay
Type: boolean
backgroundColor
Type: color
borderColor
Type: color
classNames
Type: object
constraint
Type: object
display
Type: string
durationEditable
Type: boolean
editable
Type: boolean
end
Type: object
endStr
Type: string
extendedProps
Type: object
groupId
Type: object
id
Type: object
overlap
Type: boolean
resourceEditable
Type: boolean
source
Type: EventSource
start
Type: object
startEditable
Type: boolean
startStr
Type: string
textColor
Type: color
title
Type: tagstring
url
Type: string