cordova-plugin-datepicker icon indicating copy to clipboard operation
cordova-plugin-datepicker copied to clipboard

Need to Show Previously picked time

Open munikumar604 opened this issue 8 years ago • 4 comments

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);

munikumar604 avatar Aug 31 '16 08:08 munikumar604

Anyone could you please help me

munikumar604 avatar Sep 13 '16 19:09 munikumar604

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

SammyIsra avatar Sep 15 '16 18:09 SammyIsra

When i am trying to enter time manually time picker is closing abruptly.

munikumar604 avatar Sep 17 '16 19:09 munikumar604

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(),
...

cmorbitzer avatar Mar 27 '17 08:03 cmorbitzer