skip to Main Content

how do I remove the open next view and open previous view arrow buttons from the MUI StaticTimePicker?

enter image description here

2

Answers


  1. You can use slotProps property.

    For example:

    <StaticTimePicker
        slotProps={
          {
            nextIconButton: { sx: { display: 'none' } },
            previousIconButton: { sx: { display: 'none' } }
          }
        }
        defaultValue={dayjs("2022-04-17T15:30")}
    />
    
    Login or Signup to reply.
  2. I’m not quite familiar with the API and this probably should not be considered an ‘answer’, but if everything else fails, why don’t you try some CSS to hide the elements:

    div.MuiClockPicker-root > div.MuiPickersArrowSwitcher-root {
      display:none;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search