Skip to content

Inline mode for Timepicker #140

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

Open
karaliunas opened this issue May 11, 2021 · 4 comments
Open

Inline mode for Timepicker #140

karaliunas opened this issue May 11, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@karaliunas
Copy link

karaliunas commented May 11, 2021

As for now, timepicker opens as a modal, which is fine for mobile devices. But for desktop it would be a better UX if it would open inline, because that way users don't loose the context (usually some kind of data entry form). Also, it is kind of limiting in situations where picker is in modal already.
See live example at: https://next.material-ui.com/components/time-picker/

My solution:

I suggest using optional tippy.js dropdown solution powered by Popper.js positioning engine. Also would need to implement some kind of mobile detection and I would use a "poke-it" strategy (http://www.stucox.com/blog/you-cant-detect-a-touchscreen/#poke-it) since a user has to touch/click the time icon to open the picker. Maybe anybody can suggest a more robust alternative?

This is a feature request I am filling to contribute to as I am very keen to using this component. Any ideas? Thanks!

@ChildishGiant
Copy link
Member

I've currently got an early stage prototype implementation of the material spec time picker, but it doesn't have a modal specification so currently I haven't done anything to that

@DanielRuf DanielRuf added the enhancement New feature or request label May 11, 2021
@wuda-io
Copy link
Member

wuda-io commented Oct 28, 2021

By Inline do mean that you can Render the Timepicker to a specific DOM Element? Is this correct or what so you mean? If yes then i need the Same for Datepicker.

@karaliunas
Copy link
Author

@wuda-io by Inline I mean to render it in a popover (powered by Popper.js), positioned near the focused input field.

@gselderslaghs
Copy link
Member

I've been working on this issue and created 2 pull request:
#582 implementation of the first Materialize display plugin "docked" the idea is that we can reuse this plugin for "docked" and "modal" view and implement this in different components such as timepicker and datepicker
#583 implementation of the "docked" plugin in the Timepicker component

Use the plugin with the following options:

displayPlugin: 'docked',
displayPluginOptions: {
// specify options here
}

gselderslaghs added a commit to gselderslaghs/materialize that referenced this issue Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants