Material-ui: Error Text For DatePicker

Created on 16 Jun 2016  路  2Comments  路  Source: mui-org/material-ui

Problem description

DatePicker is making use of the TextField component, but does not accept all of TextField's props such as errorText. This kind of functionality would be extremely helpful for presenting date validation errors.

Is there a particular reason why this functionality isn't already included? I'm willing to create and open a PR if the functionality is desired.

Versions

  • Material-UI: 0.15.0
  • React: 15.0.2
  • Browser: all
duplicate

Most helpful comment

Is there a particular reason why this functionality isn't already included?

It is included since unused props are spread to TextField, the props just aren't documented in DatePicker & TimePicker. A PR would be welcome - you simply need to copy the relevant propTypes and their comments from TextField to DatePicker & TimePicker.

Dupe #3172.

All 2 comments

This PR would be very useful, same thing is for TimePicker, it also could have errorText prop.

Is there a particular reason why this functionality isn't already included?

It is included since unused props are spread to TextField, the props just aren't documented in DatePicker & TimePicker. A PR would be welcome - you simply need to copy the relevant propTypes and their comments from TextField to DatePicker & TimePicker.

Dupe #3172.

Was this page helpful?
0 / 5 - 0 ratings