Niaz Estefaie
Niaz Estefaie

Reputation: 577

fullcalendar do not work with vue 2.6.12 and laravel

I'm trying to add fullcalendar library, version 5.9.0 to my project and how the documentation said I had to do

<script>
import '@fullcalendar/core/vdom' // solves problem with Vite
import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid'
import interactionPlugin from '@fullcalendar/interaction'

export default {
  components: {
    fullCalendar: FullCalendar
  },
  data() {
    return {
      calendarOptions: {
        plugins: [ dayGridPlugin, interactionPlugin ],
        initialView: 'dayGridMonth'
      }
    }
  }
}
</script>

and in the template part,

<template>
  <full-calendar :options="calendarOptions" />
</template>

The issue is the element does not render. The element does not even show in the elements while rendering !! I've removed all the external libraries but it did not work at all :(( If anyone can help me, I would appreciate that :)

Upvotes: 0

Views: 342

Answers (1)

Niaz Estefaie
Niaz Estefaie

Reputation: 577

The issue was in the level of import. When I change the stage of fullcalendar import on top of all other imports in the project It did work fine.

Upvotes: 1

Related Questions