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

feat: add support for wheel picker in ion-datetime #23981

Closed
3 tasks done
jongbonga opened this issue Sep 24, 2021 · 23 comments
Closed
3 tasks done

feat: add support for wheel picker in ion-datetime #23981

jongbonga opened this issue Sep 24, 2021 · 23 comments
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@jongbonga
Copy link

jongbonga commented Sep 24, 2021

Prequisites

Describe the Feature Request

Have the option to choose between the wheel and calendar with a mode prop.

Describe the Use Case

Most apps that were using the old wheel mode didn't cater for calendar design and have to either squeeze the whole calendar into a tight space, open a modal, or a popover to display a calendar.

the upgrade might be tedious for some people (me...)

Describe Preferred Solution

Have a mode prop to switch between calendar and wheel

<ion-calendar mode="wheel"></ion-calendar>

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Sep 24, 2021
@liamdebeasi liamdebeasi changed the title feat: support for the old wheel ion-datepicker feat: add support for wheel picker in ion-datetime Sep 24, 2021
@liamdebeasi liamdebeasi added package: core @ionic/core package type: feature request a new feature, enhancement, or improvement labels Sep 24, 2021
@ionitron-bot ionitron-bot bot removed the triage label Sep 24, 2021
@liamdebeasi
Copy link
Contributor

liamdebeasi commented Sep 24, 2021

This is something we are definitely interested in adding to Ionic. The current wheel picker in Ionic 5 has performance issues and is buggy. We did not have the resources to refactor the wheel picker and add the new calendar picker at the same time, so we chose to start with the calendar picker in Ionic 6. We should expose this new wheel picker functionality through ion-picker so developers using wheels in non-datetime contexts can take advantage of its improvements.

@liamdebeasi
Copy link
Contributor

Also our ion-datetime migration guide will cover use cases such as this so developers can easily get started with the calendar picker when Ionic 6.

@jongbonga
Copy link
Author

Looking forward to it.
Thanks

@scr2em
Copy link

scr2em commented Jan 31, 2022

@liamdebeasi Hi, what is the current progress of this feature ?

@diogomgbrito
Copy link

Hi, any news related to this feature? Having a wheel picker for day/month/year and not only month/year, year and time is needed in my project and I would like to know if we can count on this or need to find another way. Thanks!

@cperez87
Copy link

Wheel picker style is also important in our project.

The UX of the picker feels more natural to users when entering things like Birth Date, ID Expirations, etc due to the ease of going back/forth many years.

The new calendar works great when the date the customer select is near a known date (eg Today). But, for DOB type of things requires more cognitive load:

  • User must realize to click on month-year at the top to switch and go back.
  • User must realize to click again on the month-year to go back to the days view

Thank you!

@rdlabo
Copy link
Contributor

rdlabo commented Mar 20, 2022

Are you having trouble implementing your date of birth or expiration date?
Me too. I solved this problem by displaying the accordion in multiples until the Wheel Picker was implemented.

https://zenn.dev/rdlabo/articles/62f404d448df01#accordion---multi

I hope it helps.

@dodomui
Copy link

dodomui commented Mar 23, 2022

@cperez87 We have received several users feedback regarding the date-time picker not working as the user didn't realize the need to click again on the month-year to go back to the date view and select date again to make it works.

Several suggestions here.

  1. Provide a wheel picker option as mentioned above.
  2. User must select month-year first then only date.
  3. Option to disable month-year dropdown, so user can go by next or previous button.
  4. Value change accordingly after month/year change.

@migue99angel
Copy link

Hi, any news related to this feature? I think the actual ion-datetime is not user-friendly for birthdates or stuff like that.

@liamdebeasi
Copy link
Contributor

We are actively working on this feature. There is a list of PRs above your comment that show the progress of development on this feature.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #25468, and the feature will be available in an upcoming minor release of Ionic.

We do not have an estimate of when the next minor version of Ionic will be released. However, we are actively working on it. We will announce the minor release on our blog, Twitter, and GitHub release page

@liamdebeasi
Copy link
Contributor

Here is a video of the new wheel picker

wheel-picker-demo.mp4

@jongbonga
Copy link
Author

@liamdebeasi thanks for the effort.
on the date-time mode, how does one select the year?

@liamdebeasi
Copy link
Contributor

Using the wheel picker with presentation="date" gives the year its own column (shown in the first few seconds of the video). Using the wheel picker with presentation="date-time" or presentation="time-date" does not provide a way of selecting the year.

This is by design. The date + time wheel picker is designed for selecting a specific time/date in the near future or past. A good use case is a reminders app that tells you when to leave to catch a train or a bus. Using the wheel picker to set a reminder for tomorrow at 10:30 is valuable and easier to do with the wheel picker than using the current grid interface. On the other hand, setting a reminder at a particular time 5 years from now is not very valuable as that time information will likely change over the course of 5 years. Native iOS also has this same behavior.

@jongbonga
Copy link
Author

Sgtm

@mirko77
Copy link

mirko77 commented Jul 4, 2022

We are not able to trigger the seconds selection on the new Ionic 6 version.


<ion-datetime
id="datetime"
presentation="time"
value="13:47:20"
></ion-datetime>

or using the full ISO


<ion-datetime
id="datetime"
presentation="time"
value="1994-12-15T13:47:20Z"
></ion-datetime>

do not work
Screenshot 2022-07-04 at 18 33 43

@diogomgbrito
Copy link

Hey @liamdebeasi any date update on the release of the feature?

@mirko77
Copy link

mirko77 commented Jul 22, 2022

Given the limitations of the current implementation, we ended up using the Wheel Selector Plugin https://ionicframework.com/docs/native/wheel-selector

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jul 27, 2022

This was released as part of Ionic 6.2.0 earlier today: https://ionicframework.com/docs/api/datetime#wheel-style-pickers

@jongbonga
Copy link
Author

Thank you @liamdebeasi

@diogomgbrito
Copy link

Thank you @liamdebeasi !

@below43
Copy link

below43 commented Aug 1, 2022

Thanks for this @liamdebeasi

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 31, 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 Aug 31, 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: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

10 participants