简体   繁体   English

如何更改 KeyboardTimePicker (material-ui-pickers) 中的图标?

[英]How can I change icon in the KeyboardTimePicker (material-ui-pickers)?

I can't change the icon in the KeyboardTimePicker .我无法更改KeyboardTimePicker的图标。 I read about the KeyboardButtonProps and InputAdornmentProps but I don't understand how can it help me...我读过有关KeyboardButtonPropsInputAdornmentProps但我不明白它对我有什么帮助...

my KeyboardTimePicker我的键盘时间选择器

for keyboard icon there was created new prop : keyboardIcon为键盘图标创建了新道具: keyboardIcon

import Favorite from '@material-ui/icons/Favorite'
...
<KeyboardTimePicker
   label="Masked timepicker"
   placeholder="08:00 AM"
   mask="__:__ _M"
   value={selectedDate}
   onChange={handleDateChange}
   keyboardIcon={<Favorite />}
/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM