Browse Source

fix value prop of DatePicker to controlled prop

pull/671/head
afc163 9 years ago
parent
commit
41660c3814
  1. 4
      components/date-picker/index.jsx

4
components/date-picker/index.jsx

@ -75,7 +75,9 @@ function createPicker(TheCalendar, defaultFormat) {
});
},
handleChange(value) {
this.setState({value});
if (!('value' in this.props)) {
this.setState({ value });
}
const timeValue = value ? new Date(value.getTime()) : null;
// onSelect .
if (this.props.onSelect) {

Loading…
Cancel
Save