bug: ios, pressing next/prev buttons in datetime in accordion does not work
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
The arrows on ion-datetime do not work on iOS devices (tested on iPhone 11 and iPhone 11 Pro) when wrapped by ion-accordion.
Expected Behavior
The arrows should be able to change months like on every other device.
Steps to Reproduce
Use ion-accordion-group
to wrap ion-accordion
and place inside the content slot ion-datetime
component. The arrows should not work on iOS devices.
Code Reproduction URL
https://github.com/DawidWetzler/ionic-accordion-datetime-bug
Ionic Info
ionic info [WARN] Error loading @capacitor/android package.json: Error: Cannot find module ‘@capacitor/android/package’
Require stack:
- /Users/wecler/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/lib/project/index.js
- /Users/wecler/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/lib/index.js
- /Users/wecler/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/index.js
- /Users/wecler/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/bin/ionic
Ionic:
Ionic CLI : 6.19.0 (/Users/wecler/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 6.1.1
Capacitor:
Capacitor CLI : 3.4.3 @capacitor/android : not installed @capacitor/core : 3.4.3 @capacitor/ios : 3.4.3
Utility:
cordova-res : not installed globally native-run : 1.5.0
System:
NodeJS : v16.14.0 (/Users/wecler/.nvm/versions/node/v16.14.0/bin/node) npm : 8.3.1 OS : macOS Monterey
Additional Information
I’ve been looking at the issue to fix it myself but I couldn’t figure out how to fix it in a “elegant” way with preserving smooth sliding animation when changing a month.
In ion-datetime.js within the nextMonth and prevMonth methods you coul delete behaviour: 'smooth'
and the issue should be gone.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Good news: The WebKit team has fixed the issue: https://bugs.webkit.org/show_bug.cgi?id=239605
The fix should be available in an upcoming release of iOS. I will close out this thread when the fix ships.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.