Calendar Events
Calendar widget has the following events associated with it:
doLayout Event
This event is invoked for every widget when the widget position and dimensions are computed.
Syntax
Read/Write
Read + Write
Remarks
This event is invoked for all the widgets placed inside flex containers. This event is invoked in the order in which the widgets are added to the widget hierarchy and expect the frame property of the widget is calculated and available for use within this event.
This event is used to set the layout properties of child widgets in the relation to self and peer widgets whose layout is not yet performed.
The number of times this event invoked may vary per platform. It is not recommended to write business logic assuming that this function is invoked only once when there is a change in positional or dimensional properties. This event will not trigger when transformations are applied though widget is moved or scaled or rotated from its original location.
Example
Platform Availability
- iOS
- Android
- Windows
- SPA
onAppointmentTap Event
This event is triggered when you tap any of the existing appointments in the following view types:
- CALENDAR_VIEW_TYPE_DAY_VIEW
- CALENDAR_VIEW_TYPE_WEEK_VIEW
- CALENDAR_VIEW_TYPE_MONTH_VIEW
Syntax
Remarks
The details of the appointment tapped is returned with a unique id in the callback.
The unique id, identifies the appointment displayed in these calendar views.
Example
Availability
- Available on Windows
onDone Event
This event is triggered when the Done or Enter button is clicked or tapped after the calendar opens.
Syntax
Read/Write
Read + Write
Remarks
- In Desktop Web platform, this event is fired when the enter key is pressed when the Calendar widget is in focus.
- In iOS platform, the Done button is available only when the value of the inputAccessoryViewType property is
CALENDAR_INPUTACCESSORYVIEW_NEXTPREV
. So in iOS platform, theonDone
event is fired only when the value of inputAccessoryViewType property isCALENDAR_INPUTACCESSORYVIEW_NEXTPREV
.
Example
Availability
- Available in the IDE
- iOS, Desktop Web, and SPA
onEmptyCellTap Event
This event is triggered when you tap on any of the empty cells of the calendar day view.
Syntax
Remarks
This event is applicable only when the viewType is set to CALENDAR_VIEW_TYPE_DAY_VIEW. The arguments holds the value for the date time details of the empty cell being tapped in the following format “dd-MM-yyyy HH:mm”. For example, 13-10-2014 10:20.
Example
Availability
- Available on Windows
onScrollWidgetPosition Event
This event callback is invoked by the platform when the widget location position gets changed on scrolling. The onScrollWidgetPosition event returns the positional coordinates of the widget’s location with respect to the screen (screenX and screenY) and the parent container (frameX and frameY). This event is invoked asynchronously, and is not available for FlexForm widget.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Not Accessible from IDE
- Android, iOS, SPA, and Windows
onSelection Event
This event is triggered when an item is selected or deselected.
Syntax
Read/Write
Read + Write
Remarks
On Android platform, this event works only from Android OS version 4.0 and later.
Example
Availability
- Available on all platforms
onTouchEnd Event
An event callback is invoked by the platform when the user touch is released from the touch surface.
Syntax
Optional Parameters
source
Handle to the widget reference on which the user touch has ended.
x
Specifies the x-coordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
y
Specifies the y- coordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
contextInfo
On devices that support 3D Touch, specifies a key-value pair where the value specifies the force of the touch. The value 1.0 represents the force of an average touch, as determined by the system.
Note: 3D Touch is available only on iOS 9.0 and later.
Read/Write
Read + Write
Remarks
This event is invoked asynchronously.
Example
Platform Availability
- iOS, Android, Windows, and SPA
onTouchMove Event
An event callback is invoked by the platform when the touch moves on the touch surface continuously until movement ends.
Syntax
Optional Parameters
source
Handle to the widget reference on which touch moves.
x
Specifies the x-coordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
y
Specifies the y- coordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
contextInfo
On devices that support 3D Touch, specifies a key-value pair where the value specifies the force of the touch. The value 1.0 represents the force of an average touch, as determined by the system.
Note: 3D Touch is available only on iOS 9.0 and later.
Read/Write
Read + Write
Remarks
This event is invoked asynchronously.
Example
Platform Availability
- iOS, Android, Windows, and SPA
onTouchStart Event
An event callback is invoked by the platform when the user touches the touch surface.
Syntax
Optional Parameters
source
Handle to the widget reference on which the user touches.
x
Specifies the X co-ordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
y
Specifies the Y co-ordinate with in the widget with respect to widget’s co-ordinate system. It is a number indicating device independent pixel.
contextInfo
On devices that support 3D Touch, specifies a key-value pair where the value specifies the force of the touch. The value 1.0 represents the force of an average touch, as determined by the system.
Note: 3D Touch is available only on iOS 9.0 and later.
Read/Write
Read + Write
Remarks
This event is invoked asynchronously.
Example
Platform Availability
- iOS, Android, Windows, and SPA