Files
nuxt__ui/docs/app/components/content/examples/input-date/InputDateDatePickerExample.vue
Mike Newbon effbb18bfe feat(ScrollArea): new component (#5245)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-12-16 11:47:24 +01:00

29 lines
709 B
Vue

<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const inputDate = useTemplateRef('inputDate')
const modelValue = shallowRef(new CalendarDate(2022, 1, 10))
</script>
<template>
<UInputDate ref="inputDate" v-model="modelValue">
<template #trailing>
<UPopover :reference="inputDate?.inputsRef[3]?.$el">
<UButton
color="neutral"
variant="link"
size="sm"
icon="i-lucide-calendar"
aria-label="Select a date"
class="px-0"
/>
<template #content>
<UCalendar v-model="modelValue" class="p-2" />
</template>
</UPopover>
</template>
</UInputDate>
</template>