The icons are currently hard-coded:
There is already a keyboardIcon prop, but that one controls the icon in the input adornment. I don't really understand why that prop has "keyboard" in its name. It does not show a keyboard on the icon. And one would click that button precisely when _not_ using the keyboard but rather the mouse to input a date. I'd call that one openIcon (by function) or calendarIcon (by icon content).
Yeah, it is reaaly legacy name. Should be nice to change in scope of v4-alpha breaking changes
Would you like to open PR?
Well it's not just about renaming the existing prop, but also about exposing new props for those two hard-coded icons.
Yeah so I propose these changes:
keyboardIcon => calendarIcon editIcon for the mobile keyboard input view Sure, I can take a stab at this. I can't assign myself in GitHub, but stay tuned.
Yeah so I propose these changes:
- Rename
keyboardIcon=>calendarIcon
Naming the prop after the icon content doesn't play well with this usage, where we'd end up with calendarIcon: <ClockIcon/> even those two are sort-of opposites and shouldn't be equated like that.
So perhaps openIcon or something else in the direction of the icon's functionality (adornmentIcon, buttonIcon) would be better?
Hmm really, openPickerIcon should be nice?
- Use this icon also for rendering mobile keyboard input view
- Add new prop editIcon for the mobile keyboard input view
Just like for the other one, I don't think we should name the props after the icon content. How about mobileKeyboardViewIcon (that's the pen that switches to the textbox/keyboard view) and mobileDefaultViewIcon (that's the calendar icon that switches back to the regular mobile view)?
Regarding the resolution, I would suggest we go in the direction of #21453. Meaning a components prop with keys for each customization points.
Most helpful comment
Sure, I can take a stab at this. I can't assign myself in GitHub, but stay tuned.