From 2face8071614d4b7d947cf0b8a6be1976b4c3ff1 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 22 Jul 2016 16:14:50 +0800 Subject: [PATCH] Click todayButton should trigger onChange, close #1902 --- components/date-picker/createPicker.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/date-picker/createPicker.jsx b/components/date-picker/createPicker.jsx index 0a24e8aa53..3aade14dc5 100644 --- a/components/date-picker/createPicker.jsx +++ b/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 = {};