npm install --save vue-full-calendar
Or for Vue 1.x users
npm install --save email@example.com
Installing the plugin will globally add the
full-calendar component to your project.
But you can also import the standalone component to add locally or for more complex installations.
Please note that fullcalendar depends on jQuery, but you won't need to add it to your project manually, fullcalendar will handle this for you automatically if jQuery is not detected.
As of version 2.0, we have removed the automatic import of the fullcalendar.css, you will need to explicitly import this css file in your project.
I have created a simple Vue 2 webpack application as an example/playground https://github.com/BrockReece/vue-fullcalendar-example
or try out this Code Sandbox
For those wanting to use the scheduler plugin, this Code Sandbox shows you a full working example.
You can pass an array of fullclendar objects through the props
More event options can be found at http://fullcalendar.io/docs/event_data/Event_Object/
Using a JSON Feed
You can pass any custom options through to fullcalendar by using the
config prop, this includes extra event handlers.
You can set the language of your calendar by importing the corresponding locale file and setting the
locale key in the config prop. For example, to set up the Calendar in French...
Note: You won't need to set the locale config key if your app only imports a single locale file
You can edit the look and feel of fullcalendar by passing through extra props. These all have sensible defaults
- header - [obj] - docs
- defaultView - ['agendaWeek'] - docs
- editable - [true] - docs
- selectable - [true] - docs
- selectHelper - [true] - docs
- config - [true] - Pass your own custom config straight through to fullcalendar
Sometimes you may need to manipulate the Calendar from your parent component, you can use
fireMethod for this. This works with anything in the Fullcalendar docs suffixed with
(method) and it will dynamically handle as many arguments as needed.
Events and Hooks
- event-selected(event, jsEvent, view) - Triggered on eventClick()
- event-mouseover(event, jsEvent, view) - Triggered on eventMouseover()
- event-mouseout(event, jsEvent, view) - Triggered on eventMouseout()
- event-drop(event) - Triggered on eventDrop()
- event-resize(event) - Triggered on eventResize()
- event-created(event) - Triggered on select()
- event-receive(event) - Triggered on eventReceive()
- event-render(event) - Triggered on eventRender()
- view-render(view, element) - Triggered on viewRender()
- day-click(date, jsEvent, view) - Triggered on dayClick()
You can listen for these events using the following markup
- render-event(event) - Adds a new event to calendar
- remove-event(event) - Removes event from calendar
- rerender-events() - Rerenders events to reflect local changes
- refetch-events() - Makes another JSON call to event sources
- reload-events() - Removes all events and adds all events in this.events
You can trigger these events in the parent component like so...