Browse Source

Click todayButton should trigger onChange, close #1902

pull/2474/head
afc163 8 years ago
parent
commit
2face80716
  1. 6
      components/date-picker/createPicker.jsx

6
components/date-picker/createPicker.jsx

@ -64,6 +64,12 @@ export default function createPicker(TheCalendar) {
};
let calendarHandler = {
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 (props.showTime) {
pickerChangeHandler = {};

Loading…
Cancel
Save