mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(date-picker): undefined dayIndex (#2545)
This commit is contained in:
@@ -32,6 +32,11 @@ const attrs = {
|
||||
'is-dark': { selector: 'html', darkClass: 'dark' },
|
||||
'first-day-of-week': 2
|
||||
}
|
||||
|
||||
function onDayClick(_: any, event: MouseEvent): void {
|
||||
const target = event.target as HTMLElement
|
||||
target.blur()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -40,11 +45,13 @@ const attrs = {
|
||||
v-model.range="date"
|
||||
:columns="2"
|
||||
v-bind="{ ...attrs, ...$attrs }"
|
||||
@dayclick="onDayClick"
|
||||
/>
|
||||
<VCalendarDatePicker
|
||||
v-else
|
||||
v-model="date"
|
||||
v-bind="{ ...attrs, ...$attrs }"
|
||||
@dayclick="onDayClick"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user