mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
dabc4f85ab
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
18 lines
461 B
Vue
18 lines
461 B
Vue
<script setup lang="ts">
|
|
import type { DateValue } from '@internationalized/date'
|
|
import { CalendarDate } from '@internationalized/date'
|
|
|
|
const modelValue = shallowRef({
|
|
start: new CalendarDate(2022, 1, 1),
|
|
end: new CalendarDate(2022, 1, 9)
|
|
})
|
|
|
|
const isDateUnavailable = (date: DateValue) => {
|
|
return date.day >= 10 && date.day <= 16
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<UInputDate v-model="modelValue" :is-date-unavailable="isDateUnavailable" range />
|
|
</template>
|