move CalendarEvent to CMSDataType

This commit is contained in:
schooltechx 2023-04-08 00:00:04 +07:00
parent 5af1f48150
commit aaff6c92b8

View file

@ -1,8 +1,7 @@
<script lang="ts"> <script lang="ts">
import FullCalendar from '$lib/components/FullCalendar.svelte'; import FullCalendar from '$lib/components/FullCalendar.svelte';
import daygridPlugin from '@fullcalendar/daygrid'; import daygridPlugin from '@fullcalendar/daygrid';
// import type { EventClickArg } from '@fullcalendar/core'; import type {CalendarEvent} from '$lib/data/CMSDataType'
import type {CalendarEvent} from './CalendarEvent'
let calendarRef; let calendarRef;
export let events:CalendarEvent[] export let events:CalendarEvent[]
let options = { let options = {
@ -25,18 +24,7 @@
today: 'วันนี้' today: 'วันนี้'
}, },
events, events,
// eventClick: clickEvent,
}; };
/*
function clickEvent(info:EventClickArg){
alert(
'Event: ' + info.event.title +
'\nID: ' + info.event.id +
'\nCoordinates: ' + info.jsEvent.pageX + ',' + info.jsEvent.pageY +
'\nView: ' + info.view.type
);
}
*/
</script> </script>
<FullCalendar bind:this={calendarRef} {options} /> <FullCalendar bind:this={calendarRef} {options} />