question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DatePicker] Provide prop to customize the icons

See original GitHub issue

The icons are currently hard-coded:

https://github.com/mui-org/material-ui/blob/29fbcceb44e851a3a856e42035f86865dacd1fcd/packages/material-ui-lab/src/internal/pickers/PickersToolbar.tsx#L98-L102

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).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
Philipp91commented, Apr 20, 2020

Sure, I can take a stab at this. I can’t assign myself in GitHub, but stay tuned.

1reaction
Philipp91commented, Apr 20, 2020

Well it’s not just about renaming the existing prop, but also about exposing new props for those two hard-coded icons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[DatePicker] Provide prop to customize the icons · Issue #23604
I don't really understand why that prop has "keyboard" in its name. It does not show a keyboard on the icon. And one...
Read more >
How to change the icon in MUI DatePicker? - Stack Overflow
The components prop of DatePicker lets you override the inner components including the OpenPickerIcon , so this is how you override it.
Read more >
Customize Material-UI Datepicker With React
Material-UI Datepicker is a great Tool we can use as a calendar, ... to use the renderDay prop of DatePicker to extend our...
Read more >
The Ultimate Guide to Using and Styling the MUI ... - YouTube
... learn every aspect of the sx prop, styled API, and the theme, and never ... The MUI DatePicker has tons of nested...
Read more >
Date and Time pickers - Custom components - MUI X
The date picker lets users select a date from a menu. ... As an example, you could override the ActionBar and pass additional...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found