Class sap.me.OverlapCalendarModule: sap/me/OverlapCalendar

extends Control

A calendar that allows to display events in a grid and show the overlapped events

Deprecated API:Since version 1.34.0. This control was experimental since 1.12. Please use the sap.m.TeamCalendar instead!

Constructor Summary
new sap.me.OverlapCalendar(sId?, mSettings?)Constructor for a new OverlapCalendar.
Event Summary
changeDate(oControlEvent)Triggered when the displayed dates change
endOfData(oControlEvent)Indicates that we have reach the last week with data
Events borrowed from class sap.ui.core.Control
Method Summary
sap.me.OverlapCalendar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.me.OverlapCalendar with name sClassName and enriches it with the information contained in oClassInfo.
sap.me.OverlapCalendar.getMetadata()Returns a metadata object for class sap.me.OverlapCalendar.
addCalendarEvent(oCalendarEvent)Adds some calendarEvent to the aggregation calendarEvents.
attachChangeDate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the changeDate event of this sap.me.OverlapCalendar.
attachEndOfData(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the endOfData event of this sap.me.OverlapCalendar.
destroyCalendarEvents()Destroys all the calendarEvents in the aggregation calendarEvents.
detachChangeDate(fnFunction, oListener)Detaches event handler fnFunction from the changeDate event of this sap.me.OverlapCalendar.
detachEndOfData(fnFunction, oListener)Detaches event handler fnFunction from the endOfData event of this sap.me.OverlapCalendar.
fireChangeDate(mArguments?)Fires event changeDate to attached listeners.
fireEndOfData(mArguments?)Fires event endOfData to attached listeners.
getCalendarEvents()Gets content of aggregation calendarEvents.
getFirstDayOffset()Gets current value of property firstDayOffset.
getShowOverlapIndicator()Gets current value of property showOverlapIndicator.
getStartDate()Gets current value of property startDate.
getSwipeToNavigate()Gets current value of property swipeToNavigate.
getVisible()Gets current value of property visible.
getWeeksPerRow()Gets current value of property weeksPerRow.
getWidth()Gets current value of property width.
indexOfCalendarEvent(oCalendarEvent)Checks for the provided sap.me.OverlapCalendarEvent in the aggregation calendarEvents.
insertCalendarEvent(oCalendarEvent, iIndex)Inserts a calendarEvent into the aggregation calendarEvents.
onswipeleft(oEvent)
onswiperight(oEvent)
removeAllCalendarEvents()Removes all the controls from the aggregation calendarEvents.
removeCalendarEvent(vCalendarEvent)Removes a calendarEvent from the aggregation calendarEvents.
setFirstDayOffset(iFirstDayOffset)Sets a new value for property firstDayOffset.
setShowOverlapIndicator(bShowOverlapIndicator)Sets a new value for property showOverlapIndicator.
setVisible(bVisible)Sets a new value for property visible.
setWeeksPerRow(iWeeksPerRow)
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.me.OverlapCalendar(sId?, mSettings?)
Constructor for a new OverlapCalendar.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Deprecated:
Since version 1.34.0. This control was experimental since 1.12. Please use the sap.m.TeamCalendar instead!
Event Detail
changeDate(oControlEvent)
Triggered when the displayed dates change
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{object}oControlEvent.getParameters.firstDate The first date displayed in the calendar
{object}oControlEvent.getParameters.lastDate The last date that will be displayed
endOfData(oControlEvent)
Indicates that we have reach the last week with data
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{boolean}oControlEvent.getParameters.before Indicates if the data missing are before the start date or at the end
Method Detail
sap.me.OverlapCalendar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.me.OverlapCalendar with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.me.OverlapCalendar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.me.OverlapCalendar.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addCalendarEvent(oCalendarEvent): sap.me.OverlapCalendar
Adds some calendarEvent to the aggregation calendarEvents.
Parameters:
{sap.me.OverlapCalendarEvent}oCalendarEvent the calendarEvent to add; if empty, nothing is inserted
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
attachChangeDate(oData?, fnFunction, oListener?): sap.me.OverlapCalendar
Attaches event handler fnFunction to the changeDate event of this sap.me.OverlapCalendar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.me.OverlapCalendar itself.

Triggered when the displayed dates change

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.me.OverlapCalendar itself
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
attachEndOfData(oData?, fnFunction, oListener?): sap.me.OverlapCalendar
Attaches event handler fnFunction to the endOfData event of this sap.me.OverlapCalendar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.me.OverlapCalendar itself.

Indicates that we have reach the last week with data

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.me.OverlapCalendar itself
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
destroyCalendarEvents(): sap.me.OverlapCalendar
Destroys all the calendarEvents in the aggregation calendarEvents.
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
detachChangeDate(fnFunction, oListener): sap.me.OverlapCalendar
Detaches event handler fnFunction from the changeDate event of this sap.me.OverlapCalendar.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
detachEndOfData(fnFunction, oListener): sap.me.OverlapCalendar
Detaches event handler fnFunction from the endOfData event of this sap.me.OverlapCalendar.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
fireChangeDate(mArguments?): sap.me.OverlapCalendar
Fires event changeDate to attached listeners.

Expects the following event parameters:

  • firstDate of type objectThe first date displayed in the calendar
  • lastDate of type objectThe last date that will be displayed
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
fireEndOfData(mArguments?): sap.me.OverlapCalendar
Fires event endOfData to attached listeners.

Expects the following event parameters:

  • before of type booleanIndicates if the data missing are before the start date or at the end
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
getCalendar(): sap.me.Calendar
Returns:
{sap.me.Calendar} The calendar object
getCalendarEvents(): sap.me.OverlapCalendarEvent[]
Gets content of aggregation calendarEvents.

The list of events to display in the calendar grid

Returns:
{sap.me.OverlapCalendarEvent[]}
getFirstDayOffset(): int
Gets current value of property firstDayOffset.

Indicate how to offset the first day in regards to a Sunday (by default)

Default value is 0.

Returns:
{int} Value of property firstDayOffset
getShowOverlapIndicator(): boolean
Gets current value of property showOverlapIndicator.

Do we want to display the overlap indicator

Default value is false.

Returns:
{boolean} Value of property showOverlapIndicator
getStartDate(): string
Gets current value of property startDate.

The first date to display for the calendar

Returns:
{string} Value of property startDate
getSwipeToNavigate(): boolean
Gets current value of property swipeToNavigate.

Use swipe gesture to navigate

Default value is true.

Returns:
{boolean} Value of property swipeToNavigate
getVisible(): boolean
Gets current value of property visible.

Indicates if we should render this component

Default value is true.

Returns:
{boolean} Value of property visible
getWeeksPerRow(): int
Gets current value of property weeksPerRow.

Number of weeks

Default value is 2.

Returns:
{int} Value of property weeksPerRow
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

The width of the calendar

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfCalendarEvent(oCalendarEvent): int
Checks for the provided sap.me.OverlapCalendarEvent in the aggregation calendarEvents. and returns its index if found or -1 otherwise.
Parameters:
{sap.me.OverlapCalendarEvent}oCalendarEvent The calendarEvent whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertCalendarEvent(oCalendarEvent, iIndex): sap.me.OverlapCalendar
Inserts a calendarEvent into the aggregation calendarEvents.
Parameters:
{sap.me.OverlapCalendarEvent}oCalendarEvent the calendarEvent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the calendarEvent should be inserted at; for a negative value of iIndex, the calendarEvent is inserted at position 0; for a value greater than the current size of the aggregation, the calendarEvent is inserted at the last position
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
onAfterRendering()
onBeforeRendering()
onswipeleft(oEvent)
Parameters:
{event}oEvent
onswiperight(oEvent)
Parameters:
{event}oEvent
removeAllCalendarEvents(): sap.me.OverlapCalendarEvent[]
Removes all the controls from the aggregation calendarEvents.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.me.OverlapCalendarEvent[]} An array of the removed elements (might be empty)
removeCalendarEvent(vCalendarEvent): sap.me.OverlapCalendarEvent
Removes a calendarEvent from the aggregation calendarEvents.
Parameters:
{int|string|sap.me.OverlapCalendarEvent}vCalendarEvent The calendarEventto remove or its index or id
Returns:
{sap.me.OverlapCalendarEvent} The removed calendarEvent or null
setFirstDayOffset(iFirstDayOffset): sap.me.OverlapCalendar
Sets a new value for property firstDayOffset.

Indicate how to offset the first day in regards to a Sunday (by default)

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
{int}iFirstDayOffset New value for property firstDayOffset
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
setShowOverlapIndicator(bShowOverlapIndicator): sap.me.OverlapCalendar
Sets a new value for property showOverlapIndicator.

Do we want to display the overlap indicator

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Parameters:
{boolean}bShowOverlapIndicator New value for property showOverlapIndicator
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
setStartDate(sDate)
Parameters:
{string|Date}sDate The start date, expected toDateString.
setSwipeToNavigate(bSwipe)
Parameters:
{boolean}bSwipe
setVisible(bVisible): sap.me.OverlapCalendar
Sets a new value for property visible.

Indicates if we should render this component

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining
setWeeksPerRow(iWeeksPerRow)
Parameters:
{number}iWeeksPerRow The integer number of weeks per row
setWidth(sWidth): sap.me.OverlapCalendar
Sets a new value for property width.

The width of the calendar

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 100%.

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.me.OverlapCalendar} Reference to this in order to allow method chaining