Tabris.js Calendar Plugin
A calendar widget for Tabris.js, allowing to show and pick a date. Currently only Android is supported.
The following snippet shows how the
tabris-plugin-calendar plugin can be used in a Tabris.js app:
left: 0 right: 0 top: 0 bottom: 0date: 946684800000 // year 2000;
A more elaborate example can be found in the example folder. It provides a Tabris.js project that demonstrates the various features of the
tabris-plugin-calendar widget. Consult the README of the example for build instructions.
Integrating the plugin
The Tabris.js website provides detailed information on how to integrate custom widgets in your Tabris.js app. To add the plugin to your app add the following entry in your apps
To fetch the latest development version use the GitHub URL:
The wiget api consists of the object
escalendar.Calendar with the following properties and events.
The following properties can be applied on top of the common Tabris.js properties:
- The currently selected date as a unix timestamp in milliseconds
- The minimum date as a unix timestamp in milliseconds. Defaults to January 1 1900
- The maximum date as a unix timestamp in milliseconds. Defaults to January 1 2100
Fired when the user selects a date in the calendar widget.
- The new date as a unix timestamp in milliseconds
Compatible with Tabris.js 2.0.0
Development of the widget
While not required by the consumer or the widget, this repository provides a
project folder that contains platform specific development artifacts. These artifacts allow to more easily consume the native source code when developing the native parts of the widget.
The project provides a gradle based build configuration, which also allows to import the project into Android Studio.
In order to reference the Tabris.js specific APIs, the environment variable
TABRIS_ANDROID_PLATFORM has to point to the Tabris.js Android Cordova platform root directory.
The environment variable is consumed in the gradle projects build.gradle file.
See LICENSE notice.