fix(components): [date-picker] fix type of year disabled failure (#8568)

* fix(components): [date-picker]

fix date-picker's type of year disabled failure

closed #8554

* fix(components): [date-picker] fix type of year disabled failure

fix date-picker's type of year disabled failure

closed #8554

Co-authored-by: guowanzi <8750640+guowanzi@user.noreply.gitee.com>
This commit is contained in:
wangzi 2022-07-02 22:10:53 +08:00 committed by GitHub
parent 59392fa194
commit 26cc00480b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ const handleYearTableClick = (event: MouseEvent | KeyboardEvent) => {
const clickTarget = event.target as HTMLDivElement
const target = clickTarget.closest('td')
if (target) {
if (hasClass((target as any).parentNode, 'disabled')) return
if (hasClass(target, 'disabled')) return
const year = target.textContent || target.innerText
emit('pick', Number(year))
}