Skip to content

feat: Add "part" to ion-datetime, to be more flexible for special requirements #26624

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
Schwankenson opened this issue Jan 18, 2023 · 2 comments
Closed
3 tasks done
Labels

Comments

@Schwankenson
Copy link

Schwankenson commented Jan 18, 2023

Prerequisites

Describe the Feature Request

I would like to add something to closed task: #24963

It would be great to have "part=xyz" defined in ion-datetime element, to be more flexible for special requirements. Read my use case to understand what I e.g. mean

Describe the Use Case

I needed to build a date wheel like that, were user can choose a day within the next few days comfortable while showing the weekday.

image

I needed to do something like that for it:

<ion-datetime 
    presentation="date-time"
    [hourValues]="[]"
    [minuteValues]="[]"
    [min]="dateNow"          
    [preferWheel]="true" 
></ion-datetime>

And then put it do a container with overflow: hidden and margin top of -40px. That code is a freak of nature. I think it would be much easier to style it with parts. I could hide things and change height and so on.

Describe Preferred Solution

Add part= to parts of ion-datetime, to be able to style it from outside

Describe Alternatives

  • More options for datewheel: A height and option to input date format or something like that
  • Template parts to override ion-datetime parts with?

Related Code

See code in "use case" part

Additional Information

I don`t really get why you won`t let us style elements like that, or add template parts to add custom template parts.

I understand, that the idea is that you normally should not have to change the ionic elements, because you have a theme. But there will always be special things for some UIs, and it`s not a good idea that I have to install external component libraries with npm then only because customizing ionic components is limited strongly.

@ionitron-bot ionitron-bot bot added the triage label Jan 18, 2023
@liamdebeasi liamdebeasi self-assigned this Jan 18, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the report. We have two existing feature requests for this, so I am going to close this ticket in favor of the existing tickets: #25945 and #25340 (The first issue seems to be more relevant to your request than the second issue)

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2023
@liamdebeasi liamdebeasi removed their assignment Jan 18, 2023
@ionitron-bot
Copy link

ionitron-bot bot commented Feb 17, 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 Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants