move CalendarEvent to CMSDataType
This commit is contained in:
parent
5af1f48150
commit
aaff6c92b8
1 changed files with 1 additions and 13 deletions
|
|
@ -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} />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue