UNPKG

ionic-native

Version:

Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support

64 lines 2.24 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { Cordova, Plugin } from './plugin'; /** * @name Date Picker * @description * The DatePicker plugin allows the user to fetch date or time using native dialogs. * * @usage * ```typescript * import { DatePicker } from 'ionic-native'; * * * DatePicker.show({ * date: new Date(), * mode: 'date' * }).then( * date => console.log('Got date: ', date), * err => console.log('Error occurred while getting date: ', err) * ); * ``` * @interfaces * DatePickerOptions */ export var DatePicker = (function () { function DatePicker() { } /** * Shows the date and/or time picker dialog(s) * @param {DatePickerOptions} options Options for the date picker. * @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error. */ DatePicker.show = function (options) { return; }; /** * @private */ DatePicker.ANDROID_THEMES = { THEME_TRADITIONAL: 1, THEME_HOLO_DARK: 2, THEME_HOLO_LIGHT: 3, THEME_DEVICE_DEFAULT_DARK: 4, THEME_DEVICE_DEFAULT_LIGHT: 5 }; __decorate([ Cordova() ], DatePicker, "show", null); DatePicker = __decorate([ Plugin({ pluginName: 'DatePicker', plugin: 'cordova-plugin-datepicker', pluginRef: 'datePicker', repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker', platforms: ['Android', 'iOS', 'Windows'] }) ], DatePicker); return DatePicker; }()); //# sourceMappingURL=datepicker.js.map