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

ion-datepicker Use Icons with or instead of Text Labels #23106

Closed
phillipa-llama opened this issue Mar 26, 2021 · 2 comments
Closed

ion-datepicker Use Icons with or instead of Text Labels #23106

phillipa-llama opened this issue Mar 26, 2021 · 2 comments
Labels

Comments

@phillipa-llama
Copy link

Ionic version:

[] 4.x
[x] 5.x

I'm submitting a ...

[ ] bug report
[x] feature request

Current behavior:

Currently I am able to send custom PickerOption buttons into the ion-datetime component. However, I'd like to be able to include an icon with these or use an icon instead of the text label altogether. Currently there doesn't seem to be a way to do this.

image

Expected behavior:

As an example, I would like the options to replace the Close / Done / Any buttons with a relevant icon. I would also like the ability to have both an icon and a label for the button.
image

Steps to reproduce:

N/A

Related code:

this.customPickerOptions = { buttons: [ { text: 'Switch Calendar', cssClass: 'switch-btn', handler: () => { this.switchCalendar(); } }, { text: 'Cancel', handler: () => { } }, { text: 'Done', handler: (value) => { } } ] }

<ion-datetime #dateTimePicker [pickerOptions]="customPickerOptions" formControlName="validDate" displayFormat="DD MMM YYYY" [min]="getToday('YYYY-MM-DD')" [max]="getMaxValidDate()"></ion-datetime>

Other information:

Ionic info:

insert the output from ionic info here
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am adding your feature request to our datetime issue tracker here: #16630

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 28, 2021

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 Apr 28, 2021
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