fix: use DatePickerModel from v-calendar on modelValue
Fixes vue-tsc validation errors
This commit is contained in:
parent
9fe7eb58c5
commit
84a816147b
|
|
@ -4,6 +4,7 @@ import type { Calendar } from 'v-calendar'
|
||||||
import { DatePicker } from 'v-calendar'
|
import { DatePicker } from 'v-calendar'
|
||||||
import { ChevronLeft, ChevronRight } from 'lucide-vue-next'
|
import { ChevronLeft, ChevronRight } from 'lucide-vue-next'
|
||||||
import { computed, nextTick, onMounted, ref } from 'vue'
|
import { computed, nextTick, onMounted, ref } from 'vue'
|
||||||
|
import type { DatePickerModel } from 'v-calendar/dist/types/src/use/datePicker'
|
||||||
import { buttonVariants } from '@/lib/registry/default/ui/button'
|
import { buttonVariants } from '@/lib/registry/default/ui/button'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
|
@ -12,10 +13,7 @@ defineOptions({
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
modelValue?: string | number | Date | Partial<{
|
modelValue?: string | number | Date | DatePickerModel
|
||||||
start: Date
|
|
||||||
end: Date
|
|
||||||
}>
|
|
||||||
modelModifiers?: object
|
modelModifiers?: object
|
||||||
columns?: number
|
columns?: number
|
||||||
type?: 'single' | 'range'
|
type?: 'single' | 'range'
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import type { Calendar } from 'v-calendar'
|
||||||
import { DatePicker } from 'v-calendar'
|
import { DatePicker } from 'v-calendar'
|
||||||
import { ChevronLeftIcon, ChevronRightIcon } from '@radix-icons/vue'
|
import { ChevronLeftIcon, ChevronRightIcon } from '@radix-icons/vue'
|
||||||
import { computed, nextTick, onMounted, ref } from 'vue'
|
import { computed, nextTick, onMounted, ref } from 'vue'
|
||||||
|
import type { DatePickerModel } from 'v-calendar/dist/types/src/use/datePicker'
|
||||||
import { buttonVariants } from '@/lib/registry/new-york/ui/button'
|
import { buttonVariants } from '@/lib/registry/new-york/ui/button'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
|
@ -12,10 +13,7 @@ defineOptions({
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = withDefaults(defineProps< {
|
const props = withDefaults(defineProps< {
|
||||||
modelValue?: string | number | Date | Partial<{
|
modelValue?: string | number | Date | DatePickerModel
|
||||||
start: Date
|
|
||||||
end: Date
|
|
||||||
}>
|
|
||||||
modelModifiers?: object
|
modelModifiers?: object
|
||||||
columns?: number
|
columns?: number
|
||||||
type?: 'single' | 'range'
|
type?: 'single' | 'range'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user