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