How to disable views button in StaticDatePicker in React MUI v5?
The problem is that we have disabled some days and they are honored on picker view. But if you click the pencil icon it component is as shown below
And in this mode the user can select any date which breaks our app.
How do we disable views button? If we can't, then how do we make sure user can cannot select any date?
CodePudding user response:
Add below CSS in your code. This is just quickfix for normal users. pro people/hackers can still change this prperty from their browser and access the button.
.PrivateDatePickerToolbar-penIcon {
visibility: hidden
}
Live Demo