Update and clean code
This commit is contained in:
parent
3edde43c25
commit
1c9b5877d6
29 changed files with 1179 additions and 838 deletions
31
cms/src/lib/components/ActivityCalendar.svelte
Normal file
31
cms/src/lib/components/ActivityCalendar.svelte
Normal 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} />
|
||||
Loading…
Add table
Add a link
Reference in a new issue