Converted more stuff to support TS
This commit is contained in:
@@ -26,6 +26,21 @@ function onDatesSet() {
|
||||
selectedYear.value = d.getFullYear()
|
||||
}
|
||||
|
||||
function buildFullDate(month: number, year: number): Date {
|
||||
return new Date(year, month, 1); //default to first of month
|
||||
}
|
||||
|
||||
|
||||
watch([selectedMonth, selectedYear], () => {
|
||||
console.log('Selected date changed:', selectedMonth.value, selectedYear.value)
|
||||
|
||||
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// fetchEventsFor(selectedMonth.value, selectedYear.value)
|
||||
})
|
||||
|
||||
|
||||
function goPrev() { api()?.prev() }
|
||||
function goNext() { api()?.next() }
|
||||
@@ -141,6 +156,7 @@ watch(panelOpen, async () => {
|
||||
})
|
||||
|
||||
|
||||
|
||||
const startFmt = new Intl.DateTimeFormat(undefined, {
|
||||
weekday: 'short', year: 'numeric', month: 'short', day: 'numeric',
|
||||
hour: 'numeric', minute: '2-digit'
|
||||
@@ -213,7 +229,8 @@ const ext = computed(() => activeEvent.value?.extendedProps ?? {})
|
||||
aria-label="Next month" @click="goNext">
|
||||
<ChevronRight class="h-4 w-4" />
|
||||
</button>
|
||||
<button class="cursor-pointer ml-1 rounded-md border px-3 py-1.5 text-sm hover:bg-muted/40" @click="goToday">
|
||||
<button class="cursor-pointer ml-1 rounded-md border px-3 py-1.5 text-sm hover:bg-muted/40"
|
||||
@click="goToday">
|
||||
Today
|
||||
</button>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user