question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with TextField and DatePicker

See original GitHub issue

For DatePicker, I’m getting this warning:

`import DatePicker from 'material-ui/DatePicker'`
....
Warning: Unknown props `input`, `meta` on <input> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in input (created by TextField)
    in div (created by TextField)
    in TextField (created by DatePicker)
    in div (created by DatePicker)
    in DatePicker (created by ConnectedField)
    in ConnectedField (created by Connect(ConnectedField))
    in Connect(ConnectedField) (created by Field)
    in Field (at Create.js:69)
   ....

And if I do import DatePicker from redux-form-material-ui I get hit with ➡️ #37

And for TextField, I’m getting this warning:

warning.js:36 Warning: TextField contains an input of type text with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
eL-HaXocommented, Dec 1, 2016

Import DatePicker from redux-form-material-ui and add the following to your Field component:

format={(v) => ((v === '') ?  null : v)}

The component should look like:

<Field
  component={DatePicker}
  name={this.props.name}
  format={(v) => ((v === '') ?  null : v)}
/>
2reactions
advance512commented, Mar 12, 2017

Any fix for the TextField warning?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Date Picker with Textfield component error option doenst work
TextField error flag field does not work with Datepicker. The issue is present in the latest release. Current Behavior.
Read more >
Issue related to textfield and datepicker - Stack Overflow
I have an issue related to hide and show the datepicker view when click on textfield...Actually I have 2 textfields.
Read more >
Date Picker value in Textfield - FlutterFlow Community
I'm using a Date Picker to Create a record in Firestore, which works fine. However, I'd like to display the chosen date and...
Read more >
iOS 12 DatePicker value changed issue - Apple Developer
The problem is that when I scroll datepicker - it scrolls okay but value in the text field is not changing. The text...
Read more >
Update text field off date picker - Power Platform Community
I have a text field that I set the default value to "DateAdd(ThisItem.'AIRAC Date',-2)". This is taking the AIRAC Date datepicker and subtracting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found