Files
coconut-leaf/frontend/src/views/Calendar.vue
T

27 lines
769 B
Vue
Raw Normal View History

2026-07-20 21:59:57 +08:00
<script setup lang="ts">
import { ref } from 'vue';
import DateTimePicker, { TabType } from '@/components/DateTimePicker.vue';
// NOTE: This is a temporary test harness for the DateTimePicker.
// It will be removed when the Calendar page is migrated for real.
const picker = ref<InstanceType<typeof DateTimePicker>>();
const testDate = ref<Date>(new Date());
const openPicker = () => {
picker.value?.modal(testDate.value, TabType.Minute);
}
const onConfirm = (d: Date) => {
testDate.value = d;
}
</script>
2026-04-28 15:47:32 +08:00
<template>
2026-07-20 21:59:57 +08:00
<div class="container" style="margin-top: 1.25rem;">
<a class="button is-primary" @click="openPicker">{{ testDate.toLocaleString() }}</a>
</div>
<DateTimePicker ref="picker" @confirm="onConfirm" />
2026-04-28 15:47:32 +08:00
</template>
<style scoped></style>