diff --git a/components/date-picker/RangePicker.tsx b/components/date-picker/RangePicker.tsx index c3de4df83d..ef8dee362d 100644 --- a/components/date-picker/RangePicker.tsx +++ b/components/date-picker/RangePicker.tsx @@ -140,6 +140,7 @@ class RangePicker extends React.Component { formatValue(value[0], props.format), formatValue(value[1], props.format), ]); + this.focus(); } handleOpenChange = (open: boolean) => { diff --git a/components/date-picker/WeekPicker.tsx b/components/date-picker/WeekPicker.tsx index 009e749213..6255e9c122 100644 --- a/components/date-picker/WeekPicker.tsx +++ b/components/date-picker/WeekPicker.tsx @@ -64,6 +64,7 @@ class WeekPicker extends React.Component { this.setState({ value }); } this.props.onChange(value, formatValue(value, this.props.format)); + this.focus(); } clearSelection = (e: React.MouseEvent) => { e.preventDefault(); diff --git a/components/date-picker/createPicker.tsx b/components/date-picker/createPicker.tsx index dacfe6fc07..42582db666 100644 --- a/components/date-picker/createPicker.tsx +++ b/components/date-picker/createPicker.tsx @@ -80,6 +80,7 @@ export default function createPicker(TheCalendar: React.ComponentClass): any { }); } props.onChange(value, (value && value.format(props.format)) || ''); + this.focus(); } handleCalendarChange = (value: moment.Moment) => {