Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DatePicker] Triggering react warning in console when setting date #3943

Closed
nathanmarks opened this issue Apr 12, 2016 · 0 comments
Closed
Assignees
Labels
bug 🐛 Something doesn't work

Comments

@nathanmarks
Copy link
Member

TextField is changing a uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa).

Pops up in console when you use datepicker, investigating now. It is due to

value={this.state.date ? formatDate(this.state.date) : undefined}

When the date property on state is set, it switches the component from uncontrolled to controlled 👎 🎱

Versions

@nathanmarks nathanmarks added this to the 0.15.0-beta.1 Release milestone Apr 12, 2016
@nathanmarks nathanmarks self-assigned this Apr 12, 2016
nathanmarks added a commit to nathanmarks/material-ui that referenced this issue Apr 12, 2016
…ontrolled to controlled by changing the fallback value to an empty string, fixed a few documentation issues, fixes mui#3943
nathanmarks added a commit to nathanmarks/material-ui that referenced this issue Apr 12, 2016
…ontrolled to controlled by changing the fallback value to an empty string, fixed a few documentation issues, fixes mui#3943
@nathanmarks nathanmarks added the bug 🐛 Something doesn't work label Apr 12, 2016
und3fined pushed a commit to und3fined/material-ui that referenced this issue Apr 20, 2016
…ontrolled to controlled by changing the fallback value to an empty string, fixed a few documentation issues, fixes mui#3943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

1 participant