Fullcalendar.js plugin experiencing issues with click event functionality

I'm currently working on implementing a calendar in VueJS and I have specific requirements:

  • Need to display Month view
  • Want to include Week view
  • Clicking on a cell should show Day view
  • Data needs to be displayed in each cell of the calendar

Unable to use Vuetify plugin due to Bootstrap integration, so opted for fullcalendar.js instead (https://fullcalendar.io/docs/vue).

Unfortunately, there seems to be an issue with the API behind the component,

<template>
<div>
    <FullCalendar :plugins="calendarPlugins"
                  :weekends="false"
                  @dateClick="handleDateClick"
    />
</div>
</template>

<script>
    import FullCalendar from '@fullcalendar/vue'
    import dayGridPlugin from '@fullcalendar/daygrid'

    export default {
        name: "Calendar",

        components: {
            FullCalendar // make the <FullCalendar> tag available
        },

        data() {
            return {
                calendarPlugins: [ dayGridPlugin ]
            }
        },
        methods: {
            handleDateClick(arg) {
                alert(arg.date)
            }
        }
    }
</script>

<style lang='scss' scoped>
    @import '~@fullcalendar/core/main.css';
    @import '~@fullcalendar/daygrid/main.css';
</style>

No event is triggered when clicking on a date, and no errors are showing up in the console. Any idea what might be causing this issue?

Appreciate your assistance!

https://i.sstatic.net/QCVxS.png

Answer №1

As outlined in the FullCalender guidelines:

To ensure that this callback is triggered, it is essential to have the interaction plugin loaded.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can you transfer array elements to a new array using JavaScript?

I have a task to transform the fields of an array received from one server so that they can be understood by another server for upload. My approach involves first retrieving and displaying the original field names from the initial server's array to al ...

Craft a brief description for every individual component discovered

Is there a way to identify and shorten all elements containing a <tspan> tag to just ten characters each? For example: <tspan>Bla bla bla bla</tspan> <tspan>Bla bla bla bla</tspan> <tspan>Bla bla bla bla</tspan> ...

Passing a JSON object as a parameter in a dynamically created element's click event using JavaScript/AngularJS

How to pass a JSON object as a parameter in the click event of a dynamically created element using JavaScript and AngularJS? var _dataObj = "{"sor_SourcingAgentId":1,"sor_Name":"xx"}" var _dynHtml= '<input type="button" ng-click="fnSelectcustom ...

Ways to transfer information from an axios API to a state in React

I am currently working with an API that consists of an array of objects. My goal is to pass this data into a state in order to display it within a component on a website. First Approach: // Fetches the API data const newData = axios.get(url).then( ...

Exploring the population with embedded RxJs queries

I'm struggling to find a solution to this particular issue. Imagine there is an object type described as follows: Box { Fruit[n]: { Kinds[n]: { id: string; name: string; } } } From an API call, I received a bo ...

Tracking your daily nutrition using cronometer with the powerful combination of JavaScript

I'm currently developing a JavaScript cronometer in vueJS. I want the timer to start at 5 minutes (300 seconds) and then continue counting minutes and seconds. Although my cronometer is functioning, I am struggling to get it to start counting minutes ...

Activate the "order evaluation" trigger on the checkout page in Woocommerce

I have implemented the Woocommerce Advanced Shipping plugin created by Jeroen Sormani for managing shipping methods, along with the WooCommerce Pay for Payment plugin developed by Karolína Vyskočilová to add a fixed €5 fee to the "cash on delivery" pa ...

The filtering and sorting features of Ng-table do not seem to be working properly when dealing with grouped data

Currently, I am in the process of learning angular.js and have recently started using the ng-table directive. While I have successfully managed to group my data and display it using ng-table, I seem to be facing issues with sorting and filtering the data. ...

Utilizing method arguments and this.data is considered a best practice in programming

Trying to determine the best approach between passing arguments in Vue methods and utilizing data or props reference with this.localData. Consider the following template: <div @click="close_tab"/> <span> ...

When working with a set of objects, consider utilizing jQuery's InArray() method to effectively handle

Within my Javascript code, I am working with an array of Calendar objects. Each Calendar object contains an array of CalendarEvent objects. Every CalendarEvent object holds properties for Date and Name. I am looking to determine if a specific date exist ...

Scale down the canvas element before retrieving the image data

In order to feed into an algorithm, I am looking for a way for users to draw on a canvas element and then convert it into an array of length 784. This array should represent the pixel shade intensity, which can be obtained using the ctx.getImageData() meth ...

Scrolling an HTML element to a specific value within its content

Code: /* -------------------------------------NAV & BANNER------------------------ */ #logo{ height: 60px; width: 60px; } .nav-color{ transition: 0.5s; background-color: rgba(0, 0, 0, 0.75); } .nav-null-color{ transition: 0.5s; } .banner{ ...

The formcontrol for Reactive Forms is displaying the selected option as "Object object"

Within my component, I have the member Store array declared as follows: stores: Store[] The Store interface is defined as: export interface Store{ store_name: string; owner: string; display_name?: string; } In the HTML template, there is a select e ...

Failed to connect to Wordpress REST API when calling it from a NextJS server due to ECONNREFUSED error

I am currently working on a basic example that involves fetching a list of page slugs from the WordPress REST API, but I am encountering some unexpected behavior. My getPageList() function is an asynchronous function that makes a simple call to the WP API ...

Binding Angular directives without using controllerAs in the template

I am experiencing a problem with my custom directive that does not have a template (using server-generated DOM) and binding the view to a controller. Check out my code snippet on jsFiddle: angular.module('myModule', []) .directive('m ...

"Unexpected discrepancy: Bootstrap Glyphicon fails to appear on webpage, however, is visible

I am having some trouble getting the glyphicon to display properly in my side nav. The arrow head should rotate down, which is a pretty standard feature. Here is the link to the page: The glyphicon should be visible on the "Nicky's Folders" top leve ...

Function for Duplicating jQuery Events

I'm currently facing an issue where every time the browser is resized, a function is triggered. This function can turn a side panel into an accordion if the screen width meets certain criteria, or it can just display as an open side panel on larger sc ...

avoid the selection of the same options more than once

My form consists of 5 select elements with the same options. I want each option to be selected only once, so I need a code that can accomplish the following: When a user selects an option in one select element, that option should be disabled or deleted f ...

Challenge with setting asynchronous default value in React Material UI Autocomplete

Utilizing the 'Material UI' Autocomplete component to show a dropdown in my form. Whenever the user wishes to edit an item, the dropdown should autofill with the corresponding value fetched from the database. Attempting to simulate this scenario ...

Fixed columns with horizontal scrolling to prevent Datatables columns from overlapping

I'm facing an issue with my data table created using datatables. I need to fix the first two columns, but when I do so, the other two columns overlap them while scrolling horizontally. If I remove the fixed columns, the scrolling works correctly witho ...