[pickers] Expose Required Prop #16449
Labels
component: pickers
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
new feature
New feature or request
Summary
In the pickers, if you want to mark the input field as required to get the HTML5 validation and the visual indication (*) of a required input field, you can use the
slotProps
.What I would expect as a user of other MUI components is the
required
prop exposed to the pickers API directly instead of going down in theslotProps
especially since it is directly related to the input and not a custom prop that would need to be hidden.Examples
The below example shows how to do it for the
DatePicker
:The desired usage looks like below:
Motivation
Consistency with other MUI material inputs and limiting any future backward incompatibility issues caused by a change in the underlying slots being used.
Search keywords: required, picker
The text was updated successfully, but these errors were encountered: