Open saewitz opened 8 months ago
Thank you for creating this issue @saewitz.
We already have an issue with adding the top-level required
prop https://github.com/mui/mui-x/issues/7633 and it was discussed that some competitors (i.e. Kendo handles the required validation natively, even though their input has a present value).
I think that this topic is somewhat separate because it can be handled even now.
The only note is that it will probably not be possible to support this behavior with your example—the required
prop would have to be defined on the field
slot instead of textField
to make this work. 😉
Steps to reproduce
Thanks for helping with this library!
https://stackblitz.com/edit/react-zy9jcg?file=Demo.tsx
Steps:
The input should use the browser's built-in required field to note the field is required. Instead, it focuses the input and no note that the field is required.
This works as expected with an MUI TextField, and worked with DatePicker in mui-x v5.
Example code:
Search keywords: datepicker required