primevue-mirror/plugins/fullcalendar.client.js

19 lines
587 B
JavaScript
Raw Normal View History

2022-09-14 14:26:41 +00:00
import '@fullcalendar/core/vdom'; // solve problem with Vite
import dayGridPlugin from '@fullcalendar/daygrid';
import interactionPlugin from '@fullcalendar/interaction';
2022-09-14 11:26:01 +00:00
import timeGridPlugin from '@fullcalendar/timegrid';
import FullCalendar from '@fullcalendar/vue3';
2022-09-14 11:26:01 +00:00
FullCalendar.options = {
2022-09-14 14:26:41 +00:00
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin]
};
2022-09-14 11:26:01 +00:00
const $fullCalendar = {
install: (Vue, options) => {
2022-09-14 14:26:41 +00:00
Vue.config.globalProperties.$fullCalendar = FullCalendar;
}
};
2022-12-20 12:32:32 +00:00
2022-09-14 14:26:41 +00:00
export default defineNuxtPlugin((nuxtApp) => {
2022-09-14 11:26:01 +00:00
nuxtApp.vueApp.use($fullCalendar);
2022-09-14 14:26:41 +00:00
});