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

Custom time picker #1469

Open
kalnode opened this issue Apr 12, 2024 · 2 comments
Open

Custom time picker #1469

kalnode opened this issue Apr 12, 2024 · 2 comments

Comments

@kalnode
Copy link

kalnode commented Apr 12, 2024

Everything is great with this library however the time picker (hours-and-minutes) leaves much more to the imagination.

It seems picking hours-and-minutes is resigned to just basic <select> elements, which has plenty of limitations.

I have 2 issues with the time picker:

1. Cannot style the hours and minutes picker popups (because they're native <select> elements)
This library has gorgeous styling and accessibility to re-style, except for the <select> popups, which, being native HTML, can't be styled (beyond basic color). With hours-and-minutes popups, all of a sudden you see clunky aesthetics that potentially don't match brand aesthetics.

2. The hours-and-minutes popups do not auto-size or auto-position themselves
This library already uses popperjs for other popups (like the month popup, when clicking the month at the top), a library that offers auto-positioning features (this is what it's famous for). Moreover, popperjs is no longer supported, and it's grandchild, the new modern floating-ui library, does all of this even better. However, none of this power is applied to the time picker, because it's a native <select> element.

An example of my dilemma: One of my apps is a kiosk app (touchscreen tablet running a desktop OS and web app in a browser)... and the hours-and-minutes popup bleeds outside of the app boundary! As well I have no control over the size and position of it.

See screenshot... (the black border is the edge of my app):
Screenshot from Screencast from 2024-04-12 14-19-25 webm

As it stands, I cannot use the default time picker in this library.

Solutions?

A - Slots: I see a lot of discussion about using slots to make custom calendar experiences with this library, but I don't see a reference to using slots for custom time picker popups. If the time picker were a custom popup (like the month popup), some of these issues could be resolved.

B - Only use this library for date picking, and engage another library for time picking. How they'd be presented is another issue, but in any case, both wrapped in the same component, using v-model to share data.

C - Abandon this library for an entirely different DateTime picker.

@Georglider
Copy link

Hello, I'm experiencing the same issue, what solution have you chosen?

@sukbearai
Copy link

sukbearai commented Aug 7, 2024

#1493

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants