fix(components): [date-picker] the time panel is closed without losing focus (#14748)

* fix(components): [date-picker] fix bug #14728

* fix(components): [date-picker] use handleFocusPicker to fix #14728

---------

Co-authored-by: yongbo.zeng_U+ <yongbo.zeng@united-imaging.com>
This commit is contained in:
Zenyb 2023-12-03 22:07:17 +08:00 committed by GitHub
parent 980ea89714
commit 827d606a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,10 @@ const handleDatePick = (value: DateTableEmits, keepOpen?: boolean) => {
}
innerDate.value = newDate
emit(newDate, showTime.value || keepOpen)
// fix: https://github.com/element-plus/element-plus/issues/14728
if (props.type === 'datetime') {
handleFocusPicker()
}
} else if (selectionMode.value === 'week') {
emit((value as WeekPickerEmits).date)
} else if (selectionMode.value === 'dates') {