Topic: Integrating Node with Vue Calendar Plugin

Zayaan free asked 1 year 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 1 year 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!


Zayaan free commented 1 year ago

Thank you very much :)



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • 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