-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: datetime wheel picker can not show title #26095
Comments
Thanks for the report. Your current usage is no longer recommended with the new datetime form factor because the label is built into the datetime component itself. Instead, you should use the <ion-datetime>
<span slot="title">DOB</span>
</ion-datetime> Can you give that a try and let me know if it resolves the issue? |
Hi @liamdebeasi I've tried that and updated the bugreport Git repository to reflect, and the DOB title is not visible on-screen on Android when set using the slot. |
Do you have a GitHub repo I can try? For reference, here is what the title is supposed to look like: https://codepen.io/liamdebeasi/pen/abGPNog |
@liamdebeasi Yes see "Code Reproduction URL" in the bug report |
Thanks! Looks like you found a bug. Here is a dev build that should fix the issue:
|
If you prefer the minimal/condensed layout of the old Another pattern that I've seen (mainly on iOS) is to show/hide the datetime in an accordion: https://ionicframework.com/docs/api/accordion#basic-usage Both of these approaches should let you keep your app's general look and layout. |
Thanks for the issue. This has been resolved via #26101, and a fix will be available in an upcoming release of Ionic Framework. When this fix ships, you will be able to use |
Thanks @liamdebeasi, I haven't been back onto the project yet to try the dev build yet. Hoping to later this week 🥳 |
Hey @liamdebeasi, I tried this one today:
Looks perfect on iOS inside an Everything was per the example in the docs except the markup, where I used <ion-item lines="full">
<ion-label position="stacked">DOB</ion-label>
<ion-datetime-button datetime="datetime"></ion-datetime-button>
<ion-modal :keep-contents-mounted="true">
<ion-datetime presentation="date" id="datetime"></ion-datetime>
</ion-modal>
</ion-item> EDIT: the cause of the Android problem was adding margin-bottom to fix the no-space issue on iOS: ion-datetime-button {
margin-bottom: 0.5rem;
} Without it the Android display doesn't overlap the |
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. |
Prerequisites
Ionic Framework Version
Current Behavior
I upgraded from Ionic Vue v5 to Ionic Vue 6.3.0 and the new
ion-datetime
widget has problems when used within anion-item
, with text being cut off.To minimise the problems I switched from the calendar view to the wheel, and changed
<ion-label position="floating">
to<ion-label position="stacked">
The bottom of the label text is cut off, as is the right side of the date wheel (less important). Here is a screenshot from Android:
Expected Behavior
It displays without issue
Steps to Reproduce
This is an extract from the component's template, which is included inside a View:
Code Reproduction URL
https://github.com/pbowyer/ionic-bugreport
Ionic Info
Ionic:
Ionic CLI : 6.20.3 (/Users/****/.asdf/installs/nodejs/18.6.0/.npm/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 6.3.0
Capacitor:
Capacitor CLI : 4.3.0
@capacitor/android : 4.3.0
@capacitor/core : 4.3.0
@capacitor/ios : 4.3.0
Utility:
cordova-res : not installed globally
native-run : 1.7.1
System:
NodeJS : v18.6.0 (/Users/****/.asdf/installs/nodejs/18.6.0/bin/node)
npm : 8.13.2
OS : macOS Monterey
Additional Information
No response
The text was updated successfully, but these errors were encountered: