bug: datetime, month/year selection with cancel/done buttons has confusing UX
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Event should be emitted when user changes view from default to month/year selection opened when clicked on top left button in the datepicker and back to default view.
Describe the Use Case
I am showing ion-datetime in a modal. When I want to select a date in one of the past years, I must click on the month/date button in top left corner. If I then select wanted month and year, and click on done, modal closes and value is set to previously select date. This behaviour is frustrating, because many users don’t expect modal to be closed with previously selected value.
Describe Preferred Solution
If an event is emitted when these views are toggled, we can handle custom behaviour (show and hide DONE button for example) and prevent users from exiting modal unintentionally.
Describe Alternatives
No response
Related Code
<ion-button id="open-modal">Open Datetime Modal</ion-button>
<ion-modal trigger="open-modal" [backdropDismiss]="false">
<ng-template>
<ion-content>
<ion-datetime
size="cover"
[disabled]="false"
[max]="'2050-12-31'"
[(ngModel)]="date"
(ionChange)="updateValue($event)"
[showDefaultButtons]="true"
>
</ion-datetime>
</ion-content>
</ng-template>
</ion-modal>
Additional Information
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Date-Input Form Fields: UX Design Guidelines
This article discusses common input patterns, error handling, and international input for date fields. Date-Input Patterns. Calendar pickers are ...
Read more >How to Design a Perfect Date Picker? - UX World
To select a date, it is better to provide most common options at first place so that user can select the required option...
Read more >Bad Practices on Birthdate Form Fields - UX Movement
Asking users for their birthdate on a form is complicated. ... because they have to click tiny arrow buttons to select the year...
Read more >Date Picker Design Best Practices | by Nick Babich - UX Planet
Date picker is an input field that allows you to select dates through textual input ... Design for seamless movement between day-month-year.
Read more >Best practice for date-of-birth form fields | by H Locke - Medium
... usable UX and UI design pattern for a date-of-birth form field and was ... confused users and increased the likelihood of user...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@realappie if it is any help I have used a variation on this suggestion while the ionic team works on tackling this bug - https://github.com/ionic-team/ionic-framework/issues/24962#issuecomment-1093108511
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.