mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Benjamin Canac <canacb1@gmail.com>
18 lines
460 B
Vue
18 lines
460 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>
|
|
<UCalendar v-model="modelValue" :is-date-unavailable="isDateUnavailable" range />
|
|
</template>
|