mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
fix value prop of DatePicker to controlled prop
This commit is contained in:
parent
dce02dd5f9
commit
41660c3814
@ -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…
Reference in New Issue
Block a user