question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liamdebeasicommented, Aug 5, 2022

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.

1reaction
BurkusCatcommented, Aug 5, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Designing The Perfect Date And Time Picker
First things first, though: Date pickers are often considered to be a foolproof component for date selection — predictable, consistent, generic ...
Read more >
Picker | Slack App Directory
Picker randomly picks a channel member to complete a task, such as pick where to eat for lunch, perform a code review, or...
Read more >
Pickers | Android Developers
Each picker provides controls for selecting each part of the time (hour, minute, AM/PM) or date (month, day, year). Using these pickers helps ......
Read more >
Picker Wheel - Spin the Wheel to Decide a Random Choice
Picker Wheel is a wheel spinner for a random picker. Various functions & customization. Enter choices or names, spin the wheel to decide...
Read more >
react-native-community/datetimepicker - npm
By localization, we refer to the language (names of months and days), as well as order in which date can be presented in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found