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!
Event Summary
changeDate(oControlEvent)Triggered when the displayed dates change endOfData(oControlEvent)Indicates that we have reach the last week with data 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
. 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
. 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. getVisible()Gets current value of property visible
. 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
. removeCalendarEvent(vCalendarEvent)Removes a calendarEvent from the aggregation calendarEvents
. setVisible(bVisible)Sets a new value for property visible
. setWidth(sWidth)Sets a new value for property width
. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
hasStyleClass,
invalidate,
isBusy,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- Aggregations
- Events
- endOfData : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- changeDate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
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 |
Returns a metadata object for class sap.me.OverlapCalendar.
Returns:
Adds some calendarEvent to the aggregation calendarEvents
.
Parameters:
Returns:
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:
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:
Destroys all the calendarEvents in the aggregation calendarEvents
.
Returns:
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:
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:
Fires event
changeDate
to attached listeners.
Expects the following event parameters:
firstDate
of type object
The first date displayed in the calendarlastDate
of type object
The last date that will be displayed
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
endOfData
to attached listeners.
Expects the following event parameters:
before
of type boolean
Indicates 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:
Gets content of aggregation
calendarEvents
.
The list of events to display in the calendar grid
Returns:
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 |
Gets current value of property
width
.
The width of the calendar
Default value is 100%
.
Returns:
indexOfCalendarEvent(oCalendarEvent): int
Checks for the provided sap.me.OverlapCalendarEvent
in the aggregation calendarEvents
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
onswipeleft(oEvent)
Parameters:
onswiperight(oEvent)
Parameters:
Removes all the controls from the aggregation
calendarEvents
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a calendarEvent from the aggregation calendarEvents
.
Parameters:
Returns:
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:
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:
setStartDate(sDate)
Parameters:
{string|Date} | sDate | The start date, expected toDateString. |
setSwipeToNavigate(bSwipe)
Parameters:
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:
setWeeksPerRow(iWeeksPerRow)
Parameters:
{number} | iWeeksPerRow | The integer number of weeks per row |
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:
Returns: