bug: The year / month selected in the year / month picker will be reflected in the calendar with a one-month shift.
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
Current Behavior
Safari on iPhone iOS 15.1
- In Safari on iOS, after the ion-datetime embedded in ion-popover is displayed, the year / month selected in the year / month picker will be reflected in the calendar with a one-month shift.
Google Chrome on Android 12 or Windows10
- However, it will be reflected correctly on Google Chrome on Android or Windows.
Expected Behavior
- I want you to improve the behavior of Safari on iOS.
Steps to Reproduce
- Run the code below to build.
<ion-label>{{ report_date | date:"yyyy年MM月dd日 (EEE)" }}</ion-label> <ion-popover [isOpen]="isPopover" arrow="false" style="--offset-y: -35%;"> <ng-template> <ion-datetime (ionChange)="onChangeDate($event)" showDefaultTitle="true" presentation="date"> <div slot="title">報告日</div> </ion-datetime> </ng-template> </ion-popover>
- I did the same operation as the video I uploaded to Current Behavior.
Code Reproduction URL
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.0.4
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.3.3
@capacitor/android : not installed
@capacitor/core : 3.3.3
@capacitor/ios : not installed
Utility:
cordova-res : 0.15.4
native-run : 1.5.0
System:
NodeJS : v14.17.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.13
OS : Windows 10
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Error changing the year in the date picker - Anvil Works
Click on a date picker, change the year and click on apply. The year on the widget does not change.
Read more >Datepicker Month and Year Selected error - Stack Overflow
Then i change the datepicker options for user choose only Month and Year, and its work well. For example, if i select "JAN/2017",...
Read more ><input type="month"> - HTML: HyperText Markup Language
Clicking the down arrow on the right-hand side brings up a date picker that lets you select the month and year. Month control...
Read more >Dates and times - Looker Studio Help - Google Support
You can use Looker Studio to visualize and compare dates and times in ... For example, adding a Date field to your chart...
Read more >ion-datetime - Ionic Framework
Setting time-date will have the calendar picker appear after the time picker. Month and Year Selection. Month and year selection is available by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad to hear the fix is working for you! This has been resolved via https://github.com/ionic-team/ionic-framework/pull/24554, and a fix will be available in an upcoming release of Ionic Framework.
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.