Prerequisites
- 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
v8.x
Current Behavior
When a date is selected for ion-datetime with an overlay, it initially displays the correct year and month, but no date is selected. After selecting a date, the component unexpectedly switches to a different month, selects a random day, and does not close the ion-datetime overlay.
Expected Behavior
When a date is selected, the ion-datetime picker overlay should display the correct year, month, and selected date. When a different date is chosen, the textbox should update to reflect the correct year, month, and date, and the ion-datetime overlay should close.
Steps to Reproduce
- Go to https://ionicframework.com/docs/api/datetime-button#basic-usage
- Click the datetime button to open the picker overlay.
- Select any date.
Actual Result:
The picker toggles to a different month instead of correctly selecting the date.
Code Reproduction URL
https://stackblitz.com/edit/62rrssqj
Ionic Info
Locally tested this on
@ionic/angular v8.8.6
For IOS
@capacitor/ios v"8.1.0"
Additional Information
Attached is an example from the ionic website
ion-datetime-bug.mp4