Rudeg / react-input-calendar

http://rudeg.github.io/react-input-calendar/
MIT License
139 stars 94 forks source link

Use undefined for default input value #95

Closed rippedspine closed 8 years ago

rippedspine commented 8 years ago

As of React v15.0 input values must be strings or undefined. Cannot use null anymore as we get a warning.

Warning: value prop on input should not be null. Consider using the empty string to clear the component or undefined for uncontrolled components.

rippedspine commented 8 years ago

Is this considered a bugfix?

(sorry, quite new to open source contribution...)

Rudeg commented 8 years ago

@rippedspine Yep, it's a small bugfix. Thanks!

rippedspine commented 8 years ago

Hey! Just noticed that an empty string should be more accurate, since this is a controlled component. Should I make another pull request?

https://facebook.github.io/react/docs/forms.html#controlled-components

Rudeg commented 8 years ago

@rippedspine Yep, you can easy create a new PR with the empty string, it probably will be better in this case.