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

Datepicker callback function not called in Android #94

Closed
ecthurlow opened this issue Jun 18, 2015 · 6 comments
Closed

Datepicker callback function not called in Android #94

ecthurlow opened this issue Jun 18, 2015 · 6 comments

Comments

@ecthurlow
Copy link
Contributor

Using the example code, the success callback function never fires after selecting a time or date and pressing OK. When debugging the java file, I found that the onTimeSet and onDateSet functions in TimeSetListener and DateSetListener weren't being called.

@vonboth
Copy link

vonboth commented Jun 18, 2015

+1
same thing here: Android 5.1.1

@ecthurlow
Copy link
Contributor Author

When I comment out timeDialog.setButton() for BUTTON_POSITIVE on line 107 of DatePickerPlugin.java, the success callback is called as expected. Does the onTimeSet event need to be fired in that button's onClick event if it's being overriden?

@daniel7912
Copy link

I've got the same problem on Android 5.0.1

@rvolution
Copy link

+1 on android 4.2.2 and up, using cordova 5.0.0 and Crosswalk 11

@andrelsmoraes
Copy link
Contributor

I'm working on that, thank you all.

@andrelsmoraes
Copy link
Contributor

Like ecthurlow said, I needed to call onDateSet and onTimeSet on click event of the buttons. I tested on devices Motorola 5.0.2 and Samsung 4.2.2, it worked fine. Tested on emulator 4.2.2 and 5.1.1 and it worked too.

These fixes are in Pull Request #96.

If you find anything wrong, please report. I'm very sorry for this mess.

VitaliiBlagodir added a commit that referenced this issue Jun 21, 2015
VitaliiBlagodir added a commit that referenced this issue Jun 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants