A calendar widget for Tabris.js
npm install tabris-plugin-calendarA 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:
``javascript`
new escalendar.Calendar({
left: 0, right: 0, top: 0, bottom: 0,
date: 946684800000 // year 2000
}).on('dateChanged', ({value: date}) => console.log(date))
.appendTo(tabris.ui.contentView);tabris-plugin-calendar
A more elaborate example can be found in the example folder. It provides a Tabris.js project that demonstrates the various features of the widget. Consult the README of the example for build instructions.
:`xml
`To fetch the latest development version use the GitHub URL:
`xml
`API
The wiget api consists of the object
escalendar.Calendar with the following properties and events.$3
The following properties can be applied on top of the common Tabris.js properties:
*
date : _number_
* The currently selected date as a unix timestamp in milliseconds
* minDate : _number_
* The minimum date as a unix timestamp in milliseconds. Defaults to January 1 1900
* maxDate : _number_
* The maximum date as a unix timestamp in milliseconds. Defaults to January 1 2100$3
#### dateChanged
Fired when the user selects a date in the calendar widget.
##### Event parameter
*
event.value: _number_
* The new date as a unix timestamp in millisecondsCompatibility
Compatible with Tabris.js 2.0.0
$3
* Android
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.$3
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.`bash
export TABRIS_ANDROID_PLATFORM=/home/user/tabris-android-cordova
`` See LICENSE notice.