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

ionic cancel button on ios throws error

Open menkari opened this issue 9 years ago • 1 comments

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?

menkari avatar May 17 '15 23:05 menkari

+1

tigertooth01 avatar Oct 07 '16 09:10 tigertooth01