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 does not open in ios9 #183

Open
mikevic opened this issue May 21, 2016 · 12 comments
Open

Datepicker does not open in ios9 #183

mikevic opened this issue May 21, 2016 · 12 comments

Comments

@mikevic
Copy link

mikevic commented May 21, 2016

Date picker does not open in ios9 and gives a assertion failed error in the logs.

@blythburgh
Copy link

Did you get this resolved?
FYI I just moved to cordova 6 (6.1.1) and ios 7+ target and have had all sorts of collateral issues with other plugins, but this one has worked fine after I removed and re-added (all of my plugins).

@gaurav-chandra
Copy link

Same here. It does not work after I open it once, I cannot open it the second time:

*** Assertion failure in -[_UIDatePickerView _setDate:animated:forced:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.12/_UIDatePickerView.m:307
2016-05-31 10:33:06.184 My Health History[3266:1179425] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInternalInconsistencyException> Invalid parameter not satisfying: date

I get the above error when I try opening it again.

@mikevic
Copy link
Author

mikevic commented May 31, 2016

@gaurav-chandra - I think you're issue is that the options should be inside the function that opens the datepicker. :)

@gaurav-chandra
Copy link

No, the issue was with DatePicker.m file. I changed it to the following commit:

https://github.com/VitaliiBlagodir/cordova-plugin-datepicker/pull/177/commits/a7df265092f354f453b271c18b99f346538e6286

and it worked like a charm.

@aleximmauell
Copy link

gaurav in which line you added inside DatePicker.m file ??

@gaurav-chandra
Copy link

@aleximmauell don't know the line but I replaced the whole file.

@aleximmauell
Copy link

aleximmauell commented Aug 9, 2016

@gaurav-chandra : when i replaced whole file and on second firing the datepicker is not working ..

@gaurav-chandra
Copy link

@aleximmauell this might mean the file has the same old code. The original file had this problem of not opening the datepicker the second time. The fork works for me. You need to check the xcode editor for error highlighting.

@aleximmauell
Copy link

webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: Invalid parameter not satisfying: date .......is the error

@aoathout
Copy link

The only time I have hit this issue is if I don't pass a date in on the options. In DatePicker.js, if no date is passed in the defaults use "new Date()", and the formatDate() function isn't called. If you pass in a date when calling show() then the formatDate() function is called and iOS doesn't blow up trying to show the picker with the "Invalid parameter not satisfying: date" error message.

@aleximmauell
Copy link

@aoathout : can you able to show the modified code here ...

@aoathout
Copy link

aoathout commented Sep 21, 2016

@aleximmauell I create a PR for this:
#207

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