Material-ui-pickers: KeyboardTimePicker - how to hide the button

Created on 5 Mar 2020  路  4Comments  路  Source: mui-org/material-ui-pickers

Tried to look for it in the API but could not find.
Is there a way to hide the picker button while using KeyboardTimePicker?

image

Most helpful comment

I don't think you need to, but yeah it is possible using KeyboardButtonProps={{ disabled: true, style: { display: 'none' }}

All 4 comments

I don't think you need to, but yeah it is possible using KeyboardButtonProps={{ disabled: true, style: { display: 'none' }}

@chenop What's your use case for hiding the calendar icon?

I have a web app which is compatible for mobile & desktop.
For the mobile I use TimePicker (with the dialog)
For the desktop version I use the KeyboardTimePicker but I thought it might be easier for the user to just type the time with the keyboard and not with the dialog - and I don't see why I should display the picker button.

Mobile
image

Desktop
image

Thanks for sharing

Was this page helpful?
0 / 5 - 0 ratings