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

bug: datetime do not persist selected value after month change #24823

Closed
4 of 6 tasks
antoine92190 opened this issue Feb 21, 2022 · 3 comments
Closed
4 of 6 tasks

bug: datetime do not persist selected value after month change #24823

antoine92190 opened this issue Feb 21, 2022 · 3 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@antoine92190
Copy link

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

After selecting a date in the calendar, then changing month without selecting a new date and confirm using this.datetime.nativeEl.confirm(); to confirm the value, the date value is correct, but the month value is the one from the month currently displayed, not the one we selected.

Screen.Recording.2022-02-21.at.10.47.53.mov

Expected Behavior

The selected day should be kept even if we are navigating through months.

Steps to Reproduce

  • Select the last day of a month (28 February) then swipe to next month (March) without selecting any date.
  • Confirm the date using this.datetime.nativeEl.confirm()
  • The selected date is 28 March instead of 28 February

Code Reproduction URL

No response

Ionic Info

Ionic:

   Ionic CLI                     : 6.18.1 (/Users/antoinedupont/.npm-packages/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.8-dev.1644432569.937206e
   @angular-devkit/build-angular : 12.2.4 (/Users/antoinedupont/dev/agorapulse/platform/frontend/node_modules/@angular-devkit/build-angular)
   @angular-devkit/schematics    : 11.2.18
   @angular/cli                  : 12.2.4 (/Users/antoinedupont/dev/agorapulse/platform/frontend/node_modules/@angular/cli)
   @ionic/angular-toolkit        : 3.1.1

Capacitor:

   Capacitor CLI      : 3.2.4
   @capacitor/android : 3.2.4
   @capacitor/core    : 3.2.4
   @capacitor/ios     : 3.2.4

Cordova:

   Cordova CLI       : not installed
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed globally
   native-run  : 1.5.0

System:

   NodeJS : v14.17.0 (/usr/local/bin/node)
   npm    : 6.14.13
   OS     : macOS Monterey
   Xcode  : Xcode 13.2.1 Build version 13C100

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 21, 2022
@antoine92190 antoine92190 changed the title bug: datetime do not consist selected value after month change bug: datetime do not persist selected value after month change Feb 21, 2022
@sean-perkins sean-perkins self-assigned this Feb 21, 2022
@sean-perkins sean-perkins added package: core @ionic/core package type: bug a confirmed bug report labels Feb 21, 2022
@ionitron-bot ionitron-bot bot removed the triage label Feb 21, 2022
@sean-perkins
Copy link
Contributor

Hello @antoine92190 thanks for reporting this issue!

I have an open PR to address the issue causing this bug (#24827). When confirming the date selection, we were incorrectly using the visible calendar date instead of the selected calendar date.

I've created a dev build, if you would like to test and confirm the problem is resolved on your end:

6.0.9-dev.1645468846.3ebb3ac

You can install any of the @ionic/* packages with the dev build (excluding SSR packages).

Thanks!

@sean-perkins sean-perkins removed their assignment Feb 21, 2022
@antoine92190
Copy link
Author

Yes the issue seems to be fixed in the dev build. Thanks!

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 25, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants