Class sap.me.CalendarModule: sap/me/Calendar
This is the Calendar control
Deprecated API:Since version 1.26.0. This control was experimental since 1.12. Please use the sap.ui.unified.Calendar instead!
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the changeCurrentDate
event of this sap.me.Calendar
.fnFunction
to the changeRange
event of this sap.me.Calendar
.fnFunction
to the tapOnDate
event of this sap.me.Calendar
.fnFunction
from the changeCurrentDate
event of this sap.me.Calendar
.fnFunction
from the changeRange
event of this sap.me.Calendar
.fnFunction
from the tapOnDate
event of this sap.me.Calendar
. 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
- visible : boolean (default: true)
- hideNavControls : boolean (default: false)
- hideMonthTitles : boolean (default: false)
- monthsPerRow : int (default: 1)
- dayWidth : int (default: 45)
- dayHeight : int (default: 50)
- weeksPerRow : int (default: 1)
- singleRow : boolean
- monthsToDisplay : int (default: 1)
- currentDate : string
- enableMultiselection : boolean (default: false)
- firstDayOffset : int (default: 0)
- disabledWeekDays : any
- disabledDates : any
- swipeToNavigate : boolean (default: false)
- design : sap.me.CalendarDesign (default: Approval)
- selectionMode : sap.me.CalendarSelectionMode (default: SINGLE)
- width : sap.ui.core.CSSSize (default: 100%)
- days : any
- months : any
- Events
- tapOnDate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- changeCurrentDate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- changeRange : 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.
{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.26.0. This control was experimental since 1.12. Please use the sap.ui.unified.Calendar instead!
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.currentDate | new date |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.fromDate | from date |
{string} | oControlEvent.getParameters.toDate | to date |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.date | date tapped |
{boolean} | oControlEvent.getParameters.didSelect | if day was selected |
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.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
{String} | strDate | The date, produced by a former call to Date.toDateString. |
{Error} | If the string provided does not match a toDateString produced string. |
{Date} | The Date, parsed from the input string. |
fnFunction
to the changeCurrentDate
event of this sap.me.Calendar
. 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.Calendar
itself.
event fired when tap to next or previous button and currentDate is updated
{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.Calendar itself |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
fnFunction
to the changeRange
event of this sap.me.Calendar
. 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.Calendar
itself.
when the range of selected dates changes
{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.Calendar itself |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
fnFunction
to the tapOnDate
event of this sap.me.Calendar
. 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.Calendar
itself.
event fired when a date is tapped
{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.Calendar itself |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
fnFunction
from the changeCurrentDate
event of this sap.me.Calendar
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
fnFunction
from the changeRange
event of this sap.me.Calendar
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
fnFunction
from the tapOnDate
event of this sap.me.Calendar
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
changeCurrentDate
to attached listeners. Expects the following event parameters:
currentDate
of typestring
new date
{Map} | mArguments? | The arguments to pass along with the event |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
changeRange
to attached listeners. Expects the following event parameters:
fromDate
of typestring
from datetoDate
of typestring
to date
{Map} | mArguments? | The arguments to pass along with the event |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
tapOnDate
to attached listeners. Expects the following event parameters:
date
of typestring
date tappeddidSelect
of typeboolean
if day was selected
{Map} | mArguments? | The arguments to pass along with the event |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
currentDate
. the center date where the month/week will be built around
{string} | Value of property currentDate |
dayHeight
. the height of a day
Default value is 50
.
{int} | Value of property dayHeight |
days
. Array of day names, default value is sap.m.getLocaleData().getDays("abbreviated") Check sap.ui.core.LocaleData documentation for more info.
{any} | Value of property days |
dayWidth
. the width of a day
Default value is 45
.
{int} | Value of property dayWidth |
design
. Indicates the design of the calendar (mainly colors)
Default value is Approval
.
{sap.me.CalendarDesign} | Value of property design |
disabledDates
. Array of specific dates (strings or Date objects) that will be disabled/non interactive
{any} | Value of property disabledDates |
disabledWeekDays
. Array of weekDays (as integers where 0=Sunday, 1=Monday etc) to be disabled. Interaction will be disabled for these week days.
{any} | Value of property disabledWeekDays |
enableMultiselection
. to enable multiselection feature
Default value is false
.
{boolean} | Value of property enableMultiselection |
firstDayOffset
. to offset the first day of the week (0 = sunday)
Default value is 0
.
{int} | Value of property firstDayOffset |
hideMonthTitles
. hides the area of month titles
Default value is false
.
{boolean} | Value of property hideMonthTitles |
hideNavControls
. hides the area of navigation controls
Default value is false
.
{boolean} | Value of property hideNavControls |
months
. Array of month names, default value is sap.m.getLocaleData().getMonths("abbreviated") Check sap.ui.core.LocaleData documentation for more info.
{any} | Value of property months |
monthsPerRow
. months to display in a row. This sets the width of the whole control in order to contain the desired number of months per row
Default value is 1
.
{int} | Value of property monthsPerRow |
monthsToDisplay
. number of months in a row.
Default value is 1
.
{int} | Value of property monthsToDisplay |
{any} |
selectionMode
. Indicates the design of the calendar (mainly colors)
Default value is SINGLE
.
{sap.me.CalendarSelectionMode} | Value of property selectionMode |
singleRow
. boolean that sets the view to week mode or month mode
{boolean} | Value of property singleRow |
swipeToNavigate
. When enabled, swipe gestures will navigate and not select
Default value is false
.
{boolean} | Value of property swipeToNavigate |
visible
. visibility of the control
Default value is true
.
{boolean} | Value of property visible |
weeksPerRow
. weeks to display in a row
Default value is 1
.
{int} | Value of property weeksPerRow |
width
. The width of the calendar
Default value is 100%
.
{sap.ui.core.CSSSize} | Value of property width |
{String} | strDate | The Date to set, the format being identical to a date string produced by "toDateString". |
{sap.me.Calendar} | this to allow method chaining. |
dayHeight
. the height of a day
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 50
.
{int} | iDayHeight | New value for property dayHeight |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
days
. Array of day names, default value is sap.m.getLocaleData().getDays("abbreviated") Check sap.ui.core.LocaleData documentation for more info.
When called with a value of null
or undefined
, the default value of the property will be restored.
{any} | oDays | New value for property days |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
dayWidth
. the width of a day
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 45
.
{int} | iDayWidth | New value for property dayWidth |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
design
. Indicates the design of the calendar (mainly colors)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Approval
.
{sap.me.CalendarDesign} | sDesign | New value for property design |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
disabledDates
. Array of specific dates (strings or Date objects) that will be disabled/non interactive
When called with a value of null
or undefined
, the default value of the property will be restored.
{any} | oDisabledDates | New value for property disabledDates |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
disabledWeekDays
. Array of weekDays (as integers where 0=Sunday, 1=Monday etc) to be disabled. Interaction will be disabled for these week days.
When called with a value of null
or undefined
, the default value of the property will be restored.
{any} | oDisabledWeekDays | New value for property disabledWeekDays |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
enableMultiselection
. to enable multiselection feature
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bEnableMultiselection | New value for property enableMultiselection |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
firstDayOffset
. to offset the first day of the week (0 = sunday)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
{int} | iFirstDayOffset | New value for property firstDayOffset |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
hideMonthTitles
. hides the area of month titles
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bHideMonthTitles | New value for property hideMonthTitles |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
hideNavControls
. hides the area of navigation controls
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bHideNavControls | New value for property hideNavControls |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
months
. Array of month names, default value is sap.m.getLocaleData().getMonths("abbreviated") Check sap.ui.core.LocaleData documentation for more info.
When called with a value of null
or undefined
, the default value of the property will be restored.
{any} | oMonths | New value for property months |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
monthsPerRow
. months to display in a row. This sets the width of the whole control in order to contain the desired number of months per row
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
{int} | iMonthsPerRow | New value for property monthsPerRow |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
monthsToDisplay
. number of months in a row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
{int} | iMonthsToDisplay | New value for property monthsToDisplay |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
selectionMode
. Indicates the design of the calendar (mainly colors)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is SINGLE
.
{sap.me.CalendarSelectionMode} | sSelectionMode | New value for property selectionMode |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
singleRow
. boolean that sets the view to week mode or month mode
When called with a value of null
or undefined
, the default value of the property will be restored.
{boolean} | bSingleRow | New value for property singleRow |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
swipeToNavigate
. When enabled, swipe gestures will navigate and not select
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bSwipeToNavigate | New value for property swipeToNavigate |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
visible
. visibility of the control
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bVisible | New value for property visible |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
weeksPerRow
. weeks to display in a row
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
{int} | iWeeksPerRow | New value for property weeksPerRow |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
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%
.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.me.Calendar} | Reference to this in order to allow method chaining |
{any} | oDateStart | starting date of the range. It can be Strings or Date objects. |
{any} | oDateEnd | ending date of the range. It can be Strings or Date objects. |
{boolean} | bSelected | selected/unselected. Optional, if omitted it inverts each date's current state |
{any} | aDates | Array of the dates to be toggled. they can be Strings or Date objects. |
{boolean} | bSelected | select/unselect. Optional, if omitted it inverts each date's current state |
{any} | aDates | An array of dates in string representation |
{sap.me.CalendarEventType} | sType | The type of event |
{boolean} | bSelected | Add/remove the type, if ommited it will toggle |