Files
PORTAL_COD2/front/src/components/UI/Calendar.vue
T

72 lines
1.6 KiB
Vue

<template>
<full-calendar :options="calendarOptions" />
</template>
<script>
import {reactive} from 'vue'
// import '@fullcalendar/core/vdom'
import FullCalendar from '@fullcalendar/vue3'
import dayGridPlugin from '@fullcalendar/daygrid'
import interactionPlugin from '@fullcalendar/interaction'
import listPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/interaction'
export default {
name: 'Calendar',
components: {
FullCalendar
},
setup() {
const calendarOptions = reactive({
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ],
initialView: 'dayGridMonth',
locale: 'ru',
events: [
{ title: 'event 1', date: '2023-09-21' },
{ title: 'event 2', date: '2023-09-22' },
],
editable: true,
dateClick: (arg) => {
console.log(arg.date);
}
})
return { calendarOptions }
}
}
</script>
<style>
.red {
background: rgb(235, 77, 77) !important;
color: whitesmoke !important;
}
.blue {
background: rgb(59, 59, 163) !important;
color: whitesmoke !important;
}
.orange {
background: orange !important;
color: white !important;
}
.green {
background: rgb(49, 155, 49) !important;
color: white !important;
}
.blue,
.orange,
.red,
.green {
font-size: 13px;
font-weight: 500;
text-transform: capitalize;
}
.event-item {
padding: 2px 0 2px 4px !important;
}
</style>