Update and clean code

This commit is contained in:
schooltechx 2023-04-04 12:39:11 +07:00
parent 3edde43c25
commit 1c9b5877d6
29 changed files with 1179 additions and 838 deletions

View file

@ -0,0 +1,31 @@
<script lang="ts">
import FullCalendar from '$lib/components/FullCalendar.svelte';
import daygridPlugin from '@fullcalendar/daygrid';
// import timegridPlugin from '@fullcalendar/timegrid';
// import interactionPlugin from '@fullcalendar/interaction';
let calendarRef;
export let events
export let options = {
initialView: 'dayGridMonth',
plugins: [daygridPlugin],
locale: 'th',
headerToolbar: {
start: 'prev,next',
center: 'title'
},
contentHeight:"auto",
selectable: true,
buttonText: {
month: 'เดือน',
agendaDay: 'วัน',
agendaWeek: 'สัปดาห์',
today: 'วันนี้'
},
events,
dateClick: clickDate,
};
function clickDate(info: { dateStr: string; }){
alert('a day has been clicked!'+info.dateStr);
}
</script>
<FullCalendar bind:this={calendarRef} {options} />