cordova-plugin-datepicker
cordova-plugin-datepicker copied to clipboard
ionic cancel button on ios throws error
I've currently implemented the date picker in an ionic application and when using the control on ios (8.3) I press the "cancel" button which then returns the following errors:
2015-05-18 09:29:06.915 Pool Car Logbook[569:412316] JS Cancel is going to be executed
2015-05-18 09:29:07.926 Pool Car Logbook[569:412316] *** Assertion failure in -[_UIDatePickerView _setDate:animated:forced:], /SourceCache/UIKit/UIKit-3347.44/_UIDatePickerView.m:331
2015-05-18 09:29:07.927 Pool Car Logbook[569:412316] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInternalInconsistencyException> Invalid parameter not satisfying: date
When the error is thrown, the date that is returned is simply a new Date()
but the form control becomes unresponsive until the view is reloaded. As a short term measure, I've set the label for the control to be ''
so that nothing is shown to the user, however the button is still there
Is it possible to handle the cancel button click event, or better still disable/hide the button altogether?
+1