Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@covve/cordova-plugin-datetimepicker
Advanced tools
Cordova Plugin for showing a native date, time or datetime picker.
cordova plugin add @covve/cordova-plugin-datetimepicker
or for latest
cordova plugin add https://github.com/covve/skwas-cordova-plugin-datetimepicker.git
Android 4 and higher iOS 8 and higher (tested with Xcode 7.2.3 and Xcode 8)
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
anderrorCallback
respectively will be ignored if thesuccess
orerror
callback is provided on theoptions
argument.
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 | Allow older dates to be selected |
allowFutureDates | boolean | true | - | 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 | "EN" | - | supported | The locale to use for text and date/time |
okText | String | "Select" | supported | supported | The text to use for the ok button |
cancelText | String | "Cancel" | supported | supported | The text to use for the cancel button |
success | Function | - | supported | supported | The success callback |
cancel | Function | - | supported | supported | The cancel callback |
error | Function | - | supported | supported | The error callback |
android | Object | {} | optional | ignored | Android specific options |
Name | Type | Default | Description |
---|---|---|---|
theme | int | Theme_DeviceDefault_Dialog | android.R.style theme |
calendar | boolean | false | False shows spinners, however this depend on the theme selected and SDK version. When true, forces a calendar view. |
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
), choose a theme that shows a date and time picker with spinners, like Theme_DeviceDefault_Light, Theme_Holo_Dialog or the traditional theme (1).
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var myDate = new Date(); // From model.
cordova.plugins.DateTimePicker.show({
mode: "date",
date: myDate,
allowOldDates: true,
allowFutureDates: true,
minDate: new Date(),
maxDate: null,
minuteInterval: 15,
locale: "EN",
okText: "Select",
cancelText: "Cancel",
android: {
theme: 16974126, // Theme_DeviceDefault_Dialog
calendar: false,
is24HourView: true
},
success: function(newDate) {
// Handle new date.
console.info(newDate);
myDate = newDate;
},
cancel: function() {
console.info("Cancelled");
},
error: function (err) {
// Handle error.
console.error(err);
}
});
}
Note that not all options have to be set.
FAQs
Cordova DateTime picker plugin
The npm package @covve/cordova-plugin-datetimepicker receives a total of 0 weekly downloads. As such, @covve/cordova-plugin-datetimepicker popularity was classified as not popular.
We found that @covve/cordova-plugin-datetimepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.