renders a MonthPicker with ItemNavigation This is used inside the calendar. Not for stand alone usage
Constructor for a new MonthPicker.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.unified.calendar.MonthPicker(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
_firstMonth | int | 0 | The first displayed month. The value must be between 0 and 11 Visibility: hidden |
_focusedMonth | int | The focused month. The value must be between 0 and 11 Visibility: hidden |
|
columns | int | 3 | number of months in each row The value must be between 0 and 12 (0 means just to have all months in one row, independent of the number) |
intervalSelection | boolean | false | If set, interval selection is allowed |
month | int | 0 | The month is initial focused and selected The value must be between 0 and 11 Visibility: public |
months | int | 12 | number of displayed months The value must be between 1 and 12 |
primaryCalendarType | sap.ui.core.CalendarType | If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used. |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
selectedDates | 0..n | sap.ui.unified.DateRange |
Date Ranges for selected dates of the MonthPicker |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs that label this control (see WAI-ARIA attribute aria-labelledby). |
Event | Description |
---|---|
pageChange |
If less than 12 months are displayed the |
select |
Month selection changed |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addSelectedDate |
Adds some selectedDate to the aggregation selectedDates. |
attachPageChange |
Attaches event handler When called, the context of the event handler (its If less than 12 months are displayed the |
attachSelect |
Attaches event handler When called, the context of the event handler (its Month selection changed |
destroySelectedDates |
Destroys all the selectedDates in the aggregation selectedDates. |
detachPageChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.unified.calendar.MonthPicker.extend |
Creates a new subclass of class sap.ui.unified.calendar.MonthPicker with name
|
firePageChange |
Fires event pageChange to attached listeners. |
fireSelect |
Fires event select to attached listeners. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getColumns |
Gets current value of property columns. number of months in each row The value must be between 0 and 12 (0 means just to have all months in one row, independent of the number) Default value is |
getIntervalSelection |
Gets current value of property intervalSelection. If set, interval selection is allowed Default value is |
sap.ui.unified.calendar.MonthPicker.getMetadata |
Returns a metadata object for class sap.ui.unified.calendar.MonthPicker. |
getMonth |
Gets current value of property month. The month is initial focused and selected The value must be between 0 and 11 Default value is |
getMonths |
Gets current value of property months. number of displayed months The value must be between 1 and 12 Default value is |
getPrimaryCalendarType |
Gets current value of property primaryCalendarType. If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used. |
getSelectedDates |
Gets content of aggregation selectedDates. Date Ranges for selected dates of the MonthPicker |
indexOfSelectedDate |
Checks for the provided |
insertSelectedDate |
Inserts a selectedDate into the aggregation selectedDates. |
nextPage |
displays the next page |
previousPage |
displays the previous page |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllSelectedDates |
Removes all the controls from the aggregation selectedDates. Additionally, it unregisters them from the hosting UIArea. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeSelectedDate |
Removes a selectedDate from the aggregation selectedDates. |
setColumns |
Sets a new value for property columns. number of months in each row The value must be between 0 and 12 (0 means just to have all months in one row, independent of the number) When called with a value of Default value is |
setIntervalSelection |
Sets a new value for property intervalSelection. If set, interval selection is allowed When called with a value of Default value is |
setMinMax |
sets a minimum and maximum month |
setMonth |
Sets a new value for property month. The month is initial focused and selected The value must be between 0 and 11 When called with a value of Default value is |
setMonths |
Sets a new value for property months. number of displayed months The value must be between 1 and 12 When called with a value of Default value is |
setPrimaryCalendarType |
Sets a new value for property primaryCalendarType. If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used. When called with a value of |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some selectedDate to the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the pageChange event of this sap.ui.unified.calendar.MonthPicker
.
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.ui.unified.calendar.MonthPicker
itself.
If less than 12 months are displayed the pageChange
event is fired if the displayed months are changed by user navigation.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the select event of this sap.ui.unified.calendar.MonthPicker
.
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.ui.unified.calendar.MonthPicker
itself.
Month selection changed
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the pageChange event of this sap.ui.unified.calendar.MonthPicker
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the select event of this sap.ui.unified.calendar.MonthPicker
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.unified.calendar.MonthPicker 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event pageChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event select to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property columns.
number of months in each row The value must be between 0 and 12 (0 means just to have all months in one row, independent of the number)
Default value is 3
.
Gets current value of property intervalSelection.
If set, interval selection is allowed
Default value is false
.
Returns a metadata object for class sap.ui.unified.calendar.MonthPicker.
Gets current value of property month.
The month is initial focused and selected The value must be between 0 and 11
Default value is 0
.
Gets current value of property months.
number of displayed months The value must be between 1 and 12
Default value is 12
.
Gets current value of property primaryCalendarType.
If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.
Gets content of aggregation selectedDates.
Date Ranges for selected dates of the MonthPicker
Checks for the provided sap.ui.unified.DateRange
in the aggregation selectedDates. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate whose index is looked for |
Inserts a selectedDate into the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedDate | sap.ui.unified.DateRange |
The selectedDate to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation selectedDates.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a selectedDate from the aggregation selectedDates.
Param | Type | DefaultValue | Description |
---|---|---|---|
vSelectedDate | int string sap.ui.unified.DateRange |
The selectedDate to remove or its index or id |
Sets a new value for property columns.
number of months in each row The value must be between 0 and 12 (0 means just to have all months in one row, independent of the number)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 3
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iColumns | int | 3 |
New value for property |
Sets a new value for property intervalSelection.
If set, interval selection is allowed
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIntervalSelection | boolean | false |
New value for property |
sets a minimum and maximum month
Param | Type | DefaultValue | Description |
---|---|---|---|
iMin | int |
minimum month as integer (starting with 0) |
|
iMax | int |
maximum month as integer (starting with 0) |
Sets a new value for property month.
The month is initial focused and selected The value must be between 0 and 11
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMonth | int | 0 |
New value for property |
Sets a new value for property months.
number of displayed months The value must be between 1 and 12
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 12
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMonths | int | 12 |
New value for property |
Sets a new value for property primaryCalendarType.
If set, the calendar type is used for display. If not set, the calendar type of the global configuration is used.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPrimaryCalendarType | sap.ui.core.CalendarType |
New value for property |