Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Cancel Button Clicks Date Resets to Jan 1 #33

Closed
jeganwbc opened this issue Sep 11, 2019 · 6 comments
Closed

IOS Cancel Button Clicks Date Resets to Jan 1 #33

jeganwbc opened this issue Sep 11, 2019 · 6 comments
Labels

Comments

@jeganwbc
Copy link

First Time Click the Datepicker

Then cancel and open datepicker

@jeganwbc jeganwbc added the bug label Sep 11, 2019
@skwasjer
Copy link
Owner

Can you provide sample code and ? I cannot reproduce this.

@jeganwbc
Copy link
Author

cordova.plugins.DateTimePicker.show({
mode: "datetime",
date: new Date(),
allowOldDates: false,
allowFutureDates: true,
minDate: new Date(),
maxDate: null,
locale: "EN",
minuteInterval: min_interval,
okText: ok_text,
cancelText: cancel_text,
android: {
theme: 16974126, // Theme_DeviceDefault_Dialog
is24HourView: false
},
success: function (newDate) {
//success event
},
cancel: function () {
//cancel event
},
error: function (err) {
console.error(err);
}
});

@skwasjer
Copy link
Owner

Found the issue, it is happening icw. minute interval > 1. I'll push a fix.

@jeganwbc
Copy link
Author

jeganwbc commented Oct 1, 2019

ok..! I am waiting..!

@skwasjer
Copy link
Owner

A fix (and some other refactoring) has been done on develop branch. You can verify if it works by removing the plugin and reinstalling directly from git:

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

If this works well, I will push an update to NPM

@jeganwbc
Copy link
Author

Working fine..! push an update to NPM.

@skwasjer skwasjer mentioned this issue Oct 13, 2019
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants