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">
import FullCalendar from '$lib/components/FullCalendar.svelte';
import daygridPlugin from '@fullcalendar/daygrid';
// import type { EventClickArg } from '@fullcalendar/core';
import type {CalendarEvent} from './CalendarEvent'
import type {CalendarEvent} from '$lib/data/CMSDataType'
let calendarRef;
export let events:CalendarEvent[]
let options = {
@ -25,18 +24,7 @@
today: 'วันนี้'
},
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>
<FullCalendar bind:this={calendarRef} {options} />