Skip to content

feat: datetime, expose wheel for styling #25945

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

Closed
3 tasks done
mikeangeloo opened this issue Sep 14, 2022 · 6 comments
Closed
3 tasks done

feat: datetime, expose wheel for styling #25945

mikeangeloo opened this issue Sep 14, 2022 · 6 comments
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@mikeangeloo
Copy link

mikeangeloo commented Sep 14, 2022

Prerequisites

Describe the Feature Request

Hello team currently I had been working with the ion-datetime and have a lot of amazing things. It will be very useful If we can modify the styling of the ion-picker-internal, because is not meet the default font defined at global styles, we can change the Theme colors and background but no the size of the font, font-weight, font-size, font-family.

Describe the Use Case

This feature will help to customize and meet the UI look & feel of each individual personalization.

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

<ion-datetime
    presentation="date"
    [preferWheel]="true"
>
</ion-datetime>

on styles.scss

ion-datetime {
    color: #1a475f;
    font-weight: 700;
    --background: white;
    --ion-color-base: #1a475f !important;
    --ion-color-step-150: #eef5fa;
}

The result:
image

The expected result:
image

Additional Information

This element should be customizable or have ::part element to get into it

  • picker-item
  • picker-item-active
  • <div class="picker-before"></div>
  • <div class="picker-after"></div>
  • <div class="picker-highlight"></div>

image

@ionitron-bot ionitron-bot bot added the triage label Sep 14, 2022
@liamdebeasi liamdebeasi changed the title feat: ion-datetime wheel appearance feat: datetime, expose wheel for styling Sep 14, 2022
@liamdebeasi liamdebeasi added type: feature request a new feature, enhancement, or improvement package: core @ionic/core package labels Sep 14, 2022
@ionitron-bot ionitron-bot bot removed the triage label Sep 14, 2022
@sjdrew
Copy link

sjdrew commented Oct 7, 2022

I agree with this also. In fact the picker highlight in MD mode is never used and we our finding users do not know which row is the highlight as not enough contrast difference.
image

In this example many users think the black text is the selected not the green text (primary color). IOS version is fine as you highlight the row.

Also mode="ios" does not work either to force ios mode on the ion-datetime (has no effect on the popover).

@thalisvilela
Copy link

+1. In testing with some users, they found difficult to know which row is selected.

@ogaguinaga
Copy link

Are there any news on this issue? how do you change the ion-datetime component wheel styles?

@loyaj
Copy link

loyaj commented Apr 26, 2023

I'm in the same boat. Since ion-picker is a scoped component, I've been able to adjust the styles for standalone pickers. But I also need to be able to style the pickers that are part of ion-datetime, which is a shadow component.

averyjohnston added a commit that referenced this issue Jun 6, 2023
…pickers (#27529)

Issue number: resolves #25945

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Datetime wheel pickers cannot be styled.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds styling APIs in accordance with the Wheel Pickers and Time Picker
sections of [this design
doc](https://github.com/ionic-team/ionic-framework-design-documents/blob/main/projects/ionic-framework/components/datetime/datetime-styling.md).

Shadow parts added:
- `wheel-item`
- `wheel-item active`
- `time-button`
- `time-button active`

CSS properties added:
- `--wheel-highlight-background`
- `--wheel-fade-background-rgb`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.0.7-dev.11685554390.10c2ca9b`
Docs PR: ionic-team/ionic-docs#2982
@averyjohnston
Copy link
Contributor

Features to style the wheel pickers have been added via #27529 and will be available in an upcoming minor release of Ionic. Thank you!

@ionitron-bot
Copy link

ionitron-bot bot commented Jul 6, 2023

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 Jul 6, 2023
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

7 participants