Topic: Integrating Node with Vue Calendar Plugin
                  
                  Zayaan
                  free
                  asked 2 years ago
                
I’m trying to integrate a Node js API with the Vue calendar plugin. I would like to send an API call when the calendar plugin adds an event.
Is there any tutorial on the best way to do this? If not could you please provide some advice?
- thank you in advance- :)
 
                      
                      Bartosz Cylwik
                      staff
                        answered 2 years ago
                    
Hi!
You can use our addEvent event which is emitted when a new calendar event is added. For example:
<template>
  <MDBCalendar ref="basicCalendar" :events="basicEvents" @addEvent="handleAddEvent"/>
</template>
and in script tag:
<script setup lang="ts">
...
const handleAddEvent = (value) => {
  // your API call
  console.log("Event added!", value);
};
...
</script>
The value we are logging is going to show a new event object. You can find more info about MDB Vue Calendar events here:
https://mdbootstrap.com/docs/vue/plugins/calendar/#docsTabsAPI
Best Regards!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
 - Premium support: No
 - Technology: MDB Vue
 - MDB Version: MDB5 3.2.0
 - Device: Laptop
 - Browser: Chrome
 - OS: Windows
 - Provided sample code: No
 - Provided link: No