All Projects → skwasjer → skwas-cordova-plugin-datetimepicker

skwasjer / skwas-cordova-plugin-datetimepicker

Licence: MIT License
Cordova Plugin for showing a native date, time or datetime picker.

Programming Languages

javascript
184084 projects - #8 most used programming language
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to skwas-cordova-plugin-datetimepicker

Datetimepicker
jQuery Plugin Date and Time Picker
Stars: ✭ 3,402 (+9094.59%)
Mutual labels:  timepicker, datepicker, datetimepicker
Angular Bootstrap Datetimepicker
Native Angular date/time picker component styled by Twitter Bootstrap
Stars: ✭ 1,289 (+3383.78%)
Mutual labels:  timepicker, datepicker, datetimepicker
Datetimepicker
⭐️🎉一个简约、漂亮的日期时间选择器,支持全方位自定义UI
Stars: ✭ 378 (+921.62%)
Mutual labels:  timepicker, datepicker, datetimepicker
vue3-date-time-picker
Datepicker component for Vue 3
Stars: ✭ 157 (+324.32%)
Mutual labels:  timepicker, datepicker, datetimepicker
Ng2 Datetime
Datetime picker plugins wrapper for Angular2+
Stars: ✭ 165 (+345.95%)
Mutual labels:  timepicker, datepicker, datetimepicker
Pickerjs
⚠️ [Deprecated] No longer maintained. JavaScript date time picker.
Stars: ✭ 299 (+708.11%)
Mutual labels:  timepicker, datepicker, datetimepicker
Datetimepicker
This is a custom android holo datepicker timepicker
Stars: ✭ 56 (+51.35%)
Mutual labels:  timepicker, datepicker, datetimepicker
Vue Datetime
Mobile friendly datetime picker for Vue. Supports date and datetime modes, i18n and more.
Stars: ✭ 928 (+2408.11%)
Mutual labels:  timepicker, datepicker, datetimepicker
svelty-picker
Simple date & time picker in svelte
Stars: ✭ 38 (+2.7%)
Mutual labels:  timepicker, datepicker, datetimepicker
Materialdaterangepicker
A material Date Range Picker based on wdullaers MaterialDateTimePicker
Stars: ✭ 1,315 (+3454.05%)
Mutual labels:  timepicker, datepicker, datetimepicker
NodaTimePicker
A Date/Time picker component library for Blazor using NodaTime
Stars: ✭ 49 (+32.43%)
Mutual labels:  timepicker, datepicker, datetimepicker
nativescript-datetimepicker
Plugin with date and time picking fields
Stars: ✭ 26 (-29.73%)
Mutual labels:  timepicker, datepicker, datetimepicker
Datetimepicker
📅 Date and Time Picker
Stars: ✭ 90 (+143.24%)
Mutual labels:  timepicker, datepicker, datetimepicker
Material Ui Pickers
Date & Time pickers, built with ❤️ for @material-ui/core
Stars: ✭ 2,291 (+6091.89%)
Mutual labels:  timepicker, datepicker, datetimepicker
popoPicker
popoPicker是一个移动端3D滚轮日期时间和单项的选择器,支持无限循环滚动,不依赖第三方库
Stars: ✭ 26 (-29.73%)
Mutual labels:  timepicker, datepicker, datetimepicker
cordova-plugin-downloadmanager
A Cordova plugin to download file in system's default download manager
Stars: ✭ 45 (+21.62%)
Mutual labels:  cordova-plugin, phonegap-plugin
yii2-datetime-widgets
Datetime widgets for Yii2
Stars: ✭ 22 (-40.54%)
Mutual labels:  datepicker, datetimepicker
ng-persian-datepicker
Persian datepicker for angular 12+
Stars: ✭ 62 (+67.57%)
Mutual labels:  timepicker, datepicker
ionic-hockeyapp
Need HockeyApp in your Ionic application, add this package!
Stars: ✭ 19 (-48.65%)
Mutual labels:  cordova-plugin, ionic-plugin
cordova-plugin-flurryanalytics
Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
Stars: ✭ 23 (-37.84%)
Mutual labels:  cordova-plugin, phonegap-plugin

npm version Node CI

skwas-cordova-plugin-datetimepicker

Cordova Plugin for showing a native date, time or datetime picker.

Installation

cordova plugin add skwas-cordova-plugin-datetimepicker

or for latest

cordova plugin add https://github.com/skwasjer/skwas-cordova-plugin-datetimepicker.git

Supported platforms

  • Android 4.4 and higher
  • iOS 9 and higher

Methods

show

show(options)
Show the plugin with specified options.

show(options, successCallback, errorCallback)
Show the plugin with specified options and callbacks.

This was the original way to call the plugin, and is kept for compatibility.

Note: The successCallback and errorCallback respectively will be ignored if the success or error callback is provided on the options argument.

Options

Name Type Default Android iOS
mode String date date, time, datetime date, time, datetime The display mode
date Date required required The initial date to display
allowOldDates boolean true Supported Supported Allow older dates to be selected
allowFutureDates boolean true Supported Supported Allow future dates to be selected
minDate Date Supported Supported Set the minimum date that can be selected
maxDate Date Supported Supported Set the maximum date that can be selected
minuteInterval int 1 >= Honeycomb Supported For minute spinner the number of minutes per step
locale String (user default) - Supported The locale to use for text and date/time
okText String (os default) Supported Supported The text to use for the ok button
cancelText String (os default) Supported Supported The text to use for the cancel button
clearText String Supported Supported The text to use for the clear button
titleText String Depends on theme Supported The text to use for the dialog title
success Function(date) - Supported Supported The success callback
cancel Function() - Supported Supported The cancel callback
error Function(err) - Supported Supported The error callback
android Object {} optional ignored Android specific options

When providing the clearText property, an extra button is shown with intent to clear the current date. When the user taps this button, the success callback will be called with an undefined date. From a UI perspective, this button should be hidden by application code when no date is currently set by omitting the property, but this is up to you.

Android options

Name Type Default Description
theme int Theme_DeviceDefault_Dialog android.R.style theme
is24HourView boolean true Use a 24 hour clock

On Lollipop and upwards the date and time pickers changed to calendar and radial pickers. If you want to use spinners (for example to use minuteInterval), use a built-in android.R.style theme that shows a date and time picker with spinners or read up here how to customize this.

Example

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {

    var myDate = new Date(); // From model.

    cordova.plugins.DateTimePicker.show({
        mode: "date",
        date: myDate,
        success: function(newDate) {
            // Handle new date.
            console.info(newDate);
            myDate = newDate;
        }
    });
}

hide

hide()
Hide the date time picker.

If the picker is currently being shown and a cancel-callback was provided in the options, the callback will be called when the picker is hidden.

Example

cordova.plugins.DateTimePicker.hide();

Changelog

For a list of all changes see here.

Build requirements

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].