react-hook-form-mui: DatePickerElement and TimePickerElement are hiding validation errors reported by MUI components

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The MUI DatePicker and TimePicker components are reporting a range of validation errors defined here. These errors are disregarded and hidden by DatePickerElement and TimePickerElement, resulting in incorrect form submission.

E.g. in case of invalidDate:

MUI DatePicker: image

DatePickerElement: image

Same behaviour with all types of invalid date and time value (disabled past or future dates, min and max dates and times, etc.)

Expected behavior 🤔

Validation errors should be rendered in the same way as in the MUI components.

Steps to reproduce 🕹

Steps:

  1. Pick a date
  2. Delete the month part of the date
  3. The component should turn red to show the invalidDate error

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

v6.6.1 is available. @sadik-malik thanks for your contribution 👍