fix again: Datepicker 触发两次 onChange (#3417)

* fix again

* fix lint
This commit is contained in:
陆离 2016-10-13 14:48:09 +08:00 committed by 偏右
parent f3cbbc02e9
commit 24a68a8961

View File

@ -73,8 +73,8 @@ export default function createPicker(TheCalendar) {
onOk: this.handleChange,
// fix https://github.com/ant-design/ant-design/issues/1902
onSelect: (value, cause) => {
if (cause && cause.source === 'todayButton') {
this.handleChange(value);
if (!('value' in this.props)) {
this.setState({ value });
}
},
};