Hide focus cursor in the KeyboardDateTimePicker

50 Views Asked by At

I have a problem hiding the focus cursor in the KeyboardDateTimePicker. I don't want to see the blinking cursor show in the KeyboardDateTimePicker.

I have tried the below coding, cannot work.

<MuiPickersUtilsProvider utils={MomentUtils}>
<KeyboardDateTimePicker
  className="form-control"
  value={formatDateTimeStringAsDateTime(selectedDate)}
  onChange={handleDateChange}
  name="appointmentDate"
  minDate={new Date()}
  format={SAASDateTimeFormat}
  margin="dense"
  onKeyDown={onKeyDown}
  selectionColor={'transparent'}
/>
</MuiPickersUtilsProvider>

Below is my result, the focus cursor still appears in the KeyboardDateTimePicker :

img1

Is it selectionColor={'transparent'} cannot be worked if using MuiPickersUtilsProvider? Does anyone have good ideas to fix this? Thanks.

0

There are 0 best solutions below