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: ion-datetime presentation="date-time" preferwheel="true" date range limited to same year #25895

Closed
4 of 7 tasks
mCassanoQuix opened this issue Sep 7, 2022 · 4 comments · Fixed by #25896
Closed
4 of 7 tasks
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@mCassanoQuix
Copy link

Prerequisites

Ionic Framework Version

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

Current Behavior

Using component ion-datetime with properties "presentation" set to "date-time" and "preferwheel" set to "true" allows picking days with the wheel interface one by one, e.g. "January 1st, January 2nd, ..."; selecting a day results in an output date that reflects selected day/month and time, but output year is always the initial date's year

Expected Behavior

Scrolling a date before January 1st or December 31st should either regress or progress the year by one, respectively, e.g. "December 31st 2020" > "January 1st 2021".

Steps to Reproduce

In the included repo, select the dateTo field and scroll one day forward to january 1st

Code Reproduction URL

https://ionic6-angular14-bn9qzc.stackblitz.io

Ionic Info

Ionic:

Ionic CLI : 6.20.0 (/Users/user/.nvm/versions/node/v16.14.2/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.2.5
@angular-devkit/build-angular : 14.2.1
@angular-devkit/schematics : 14.2.1
@angular/cli : 14.2.1
@ionic/angular-toolkit : 7.0.0

Capacitor:

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

Utility:

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

System:

NodeJS : v16.14.2 (/Users/user/.nvm/versions/node/v16.14.2/bin/node)
npm : 8.5.0
OS : macOS Monterey

─────────────────────────────────────────────────

 Ionic CLI update available: 6.20.0 → 6.20.1
      Run npm i -g @ionic/cli to update

─────────────────────────────────────────────────

Additional Information

The requested behavior could be given as an option to not limit use cases. It could also be solved by giving the option to select year, month and day individually as the old component could be configured to do.

@ionitron-bot ionitron-bot bot added the triage label Sep 7, 2022
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Sep 7, 2022
@ionitron-bot ionitron-bot bot removed the triage label Sep 7, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. Here is a dev build if you would like to test a proposed fix:

npm install @ionic/[email protected]

Note: You may need to install this in a local Ionic app. StackBlitz sometimes has issues installing dev builds of Ionic.

@mCassanoQuix
Copy link
Author

Hello, thanks for the rapid response, i have tested the fix locally with the aforementioned version and it looks to be working fine now, years advance and regress correctly using the wheel. I will eagerly wait for the upcoming release including the fix.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #25896, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Oct 9, 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 Oct 9, 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

Successfully merging a pull request may close this issue.

2 participants