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: wheel picker month/day order should account for locale #25722

Closed
4 of 7 tasks
BurkusCat opened this issue Aug 5, 2022 · 5 comments · Fixed by #25726
Closed
4 of 7 tasks

bug: wheel picker month/day order should account for locale #25722

BurkusCat opened this issue Aug 5, 2022 · 5 comments · Fixed by #25726
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@BurkusCat
Copy link

Prerequisites

Ionic Framework Version

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

Current Behavior

The ion-datepicker when using preferWheel uses an American date format with the month first. Changing the locale of the picker doesn't fix this. It should be possible to have the following formats:

  • Day/month/year
  • Year/month/day

image

Expected Behavior

Locale should change the order of the columns. Or there should be a separate property that also allows setting the year first.

Steps to Reproduce

  1. Add an ion-datepicker with [preferWheel] and Locale en-GB
  2. Open it and observe the wrong order of columns for this locale

Code Reproduction URL

No response

Ionic Info

$ ionic info
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

       Require stack:
       - C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
       - C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
       - C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
       - C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

   Ionic CLI                     : 6.19.0 (C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.2.0
   @angular-devkit/build-angular : 13.2.6
   @angular-devkit/schematics    : 13.2.6
   @angular/cli                  : 13.2.6
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 3.5.1
   @capacitor/android : 3.5.1
   @capacitor/core    : 3.5.1
   @capacitor/ios     : not installed

Utility:

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

System:

   NodeJS : v16.15.0 (C:\Program Files\nodejs\node.exe)
   npm    : 8.5.5
   OS     : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Aug 5, 2022
@liamdebeasi liamdebeasi changed the title bug: ion-datepicker [preferWheel] is in American date format bug: wheel picker month/day order should account for locale Aug 5, 2022
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Aug 5, 2022
@ionitron-bot ionitron-bot bot removed the triage label Aug 5, 2022
@liamdebeasi
Copy link
Member

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

6.2.2-dev.11659710120.1586c47e

@BurkusCat
Copy link
Author

Wow, that was fast! 🤯 Thank you @liamdebeasi it is looking great!

image

Initially, after installing the package it did not fix the issue. This is because the wrong package was installed into the @ionic/angular node modules. Is there a way to install these packages better in the future (I just copy and pasted the one that did install correctly to the @ionic/angular node modules which worked)
image

@liamdebeasi
Copy link
Member

It depends on the project setup. Installing @ionic/angular@6.2.2-dev.11659710120.1586c47e should also install @ionic/core@6.2.2-dev.11659710120.1586c47e unless you have @ionic/core explicitly installed (which apps generally should not have). The exception here is if you are using a StackBlitz starter app. There are some issues with version caching in non-web container setups that we are trying to better understand.

@liamdebeasi
Copy link
Member

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

fbalbinoribeiro pushed a commit to MEDGRUPOGIT/ionic-framework that referenced this issue Aug 8, 2022
@ionitron-bot
Copy link

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