提交 41660c38 编写于 作者: A afc163

fix value prop of DatePicker to controlled prop

上级 dce02dd5
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册