cordova-plugin-datepicker
cordova-plugin-datepicker copied to clipboard
Need to Show Previously picked time
Hi Team, I need to show previously picked time again in time picker and it is not working please help me .
var options = {
date: date || (new Date()), // here i am passing date with time
mode: 'time', // date | time | datetime (iOS, Windows only),
minDate: minDate || (new Date()),
androidTheme: 3
};
function onSuccess(date) {
// alert('Selected date: ' + date);
}
function onError(error) { // Android only
}
datePicker.show(options, onSuccess, onError);
Anyone could you please help me
Bump.
I am having the same issue on Android. Datepicker is ignoring any default set date or time being set. I tried sending both a Date object and a string, neither worked.
Plugin version: 0.9.3 Tested on Android 6.0
When i am trying to enter time manually time picker is closing abruptly.
See my comment on #219.
For Android, set minDate
to an integer instead of a Date object. iOS still accepts a Date object. For example:
// If iOS
...
minDate: minDate || new Date(),
...
// If Android
...
minDate: minDate.getTime() || Date.now(),
...