cordova-plugin-datetimepicker

1.1.2 • Public • Published

npm version

Cordova Plugin DateTimePicker

Native date and time picker for Android.

Installation

cordova plugins add cordova-plugin-datetimepicker --save

Usage

var options = {
    type: 'date',         // 'date' or 'time', required
    date: new Date(),     // date or timestamp, default: current date
    minDate: new Date(),  // date or timestamp
    maxDate: new Date()   // date or timestamp
};
 
window.DateTimePicker.pick(options, function (timestamp) {
    window.alert(timestamp);
});

Screenshots

The following screenshots were made on a device with Android 6.0. The plugin uses the default styles of the device it's running on.

Date Picker Time Picker

Development

# uninstall old version if present 
cordova plugins remove cordova-plugin-datetimepicker
 
# by using --link the Java files are updated instantly (doesn't work for JavaScript) 
cordova plugins add --link ../cordova-plugin-datetimepicker
 
cordova run android --device

Package Sidebar

Install

npm i cordova-plugin-datetimepicker

Weekly Downloads

9

Version

1.1.2

License

MIT

Last publish

Collaborators

  • alex-pl