Rudeg / react-input-calendar

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

React 15 throws warning for inputs with null values #70

Closed lindslev closed 8 years ago

lindslev commented 8 years ago

@Rudeg

React 15 throws a warning for inputs with null values, which basically happens if you pass any sort of false-y value as a date prop to the calendar (because of the ternaries throughout Calendar.js). The warning can be removed by passing an empty string '' or undefined as the value - but, if you pass undefined as the default, and later change the value of the input, you'll get another warning about changing from uncontrolled to controlled components. Therefore, we should default to an empty string.