fix: date-picker keydown event not work
parent
7b55c0d2fb
commit
e9b6914282
|
@ -194,8 +194,9 @@ export default function createPicker (TheCalendar, props) {
|
|||
return (
|
||||
<span
|
||||
class={props.pickerClass}
|
||||
onFocus={focus}
|
||||
onBlur={blur}
|
||||
// tabIndex={props.disabled ? -1 : 0}
|
||||
// onFocus={focus}
|
||||
// onBlur={blur}
|
||||
>
|
||||
<VcDatePicker
|
||||
{...vcDatePickerProps}
|
||||
|
|
|
@ -111,7 +111,7 @@ const Picker = {
|
|||
|
||||
onKeyDown (event) {
|
||||
if (event.keyCode === KeyCode.DOWN && !this.sOpen) {
|
||||
this.open()
|
||||
this.openCalendar()
|
||||
event.preventDefault()
|
||||
}
|
||||
},
|
||||
|
@ -177,8 +177,8 @@ const Picker = {
|
|||
},
|
||||
|
||||
focusCalendar () {
|
||||
if (this.sOpen && this.calendarInstance && this.calendarInstance.context) {
|
||||
this.calendarInstance.context.focus()
|
||||
if (this.sOpen && this.calendarInstance && this.calendarInstance.componentInstance) {
|
||||
this.calendarInstance.componentInstance.focus()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue