Having trouble getting Fullcalendar to show up on my cordova app

Currently, I am in the process of building a mobile application using ionic and cordova. My goal is to incorporate a timetable system utilizing Fullcalendar and a PHP page that showcases MySQL data in JSON format. Despite my efforts, I am encountering difficulties in getting the Fullcalendar to properly display on the page. To navigate through my project, I am relying on the Angular UI Router provided by cordova.

The following code snippet highlights where the necessary scripts are referenced within the Header:

    <!--Fullcalendar libs-->
    <link rel='stylesheet' href='../plugins/fullcalendar/fullcalendar.css'/>
    <script src='../plugins/fullcalendar/lib/jquery.min.js'></script>
    <script src='../plugins/fullcalendar/lib/moment.min.js'></script>
    <script src='../plugins/fullcalendar/fullcalendar.js'></script> 

Furthermore, in app.js, I have invoked the "$(document).ready(function()" script as shown below:

var App = angular.module("App", ["ionic"]);

$(document).ready(function() {

// page is now ready, initialize the calendar...

$('#calendar').fullCalendar({
    // insert your options and callbacks here
})

});

Despite checking the console in chrome for any errors, I haven't come across anything out of the ordinary. Are there any additional steps I should be taking? I welcome alternative methods or suggestions on how to proceed since incorporating this system has proven to be a major time-consuming element in the overall project. Any assistance would be highly appreciated.

UPDATE: A suggested solution was to install the Angular-UI/UI-Calander library mentioned in X31's comments. Upon attempting to integrate the library, I encountered numerous errors indicating an undefined entity. After backtracking my actions and undoing the installation of ui-calendar, I embarked on another attempt and successfully configured Bower. However, during the process, I faced three choices regarding installing jquery.

Update 2: Progressing further, I managed to minimize the number of errors to a single "Type Error: undefined is not a function." This led me to believe that X31 was accurate in suggesting a missing library. Here is a snippet from the header section of my html document (please note I have disabled the angular.js call due to its prior inclusion elsewhere causing warnings):

    <!--Fullcalendar libraries-->
    <script type="text/javascript" src="lib/jquery/dist/jquery.js"></script>
    <script type="text/javascript" src="lib/jquery-ui/ui/jquery-ui.js"></script>
    <!--<script type="text/javascript" src="lib/angular/angular.js"></script>-->
    <script type="text/javascript" src="lib/angular-ui-calendar/src/calendar.js"></script>
    <script type="text/javascript" src="lib/fullcalendar/fullcalendar.js"></script>
    <script type="text/javascript" src="lib/fullcalendar/gcal.js"></script>

Answer №1

Avoid using jQuery plugins in Angular, as they may not work properly within the Angular scope and digest cycle (not recommended for Angular apps). Instead, consider using Angular directives like Angular Version of FullCalendar

To add a calendar, you can include something similar to the following code snippet:

<div ui-calendar ng-model="eventSources"></div>

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

Import a precise model from a glb file

Greetings! I am relatively new to working with ThreeJS and just getting the hang of it. After going through some tutorials, I have successfully managed to load glb files and render them in my browser with ease. Recently, I downloaded a GLB file from that ...

Find Discounts Array

Is there a way to determine the Array of Discounts based on the Base Price initially and then calculate them against the Amount After Discount? In the image provided below, we have the Base Price. This base price may include multiple discounts. Each disc ...

Ways to show an input box even when there are no results found

I currently have a database with 5 books, but only 3 of them have prices listed. How can I modify my code to display an input box for all books, regardless of whether they have a price in the database? I am new to coding, so I would appreciate it if you co ...

The issue with Angular's mat-icon not displaying SVGs masked is currently being investigated

I have a collection of .svgs that I exported from Sketch (refer to the sample below). These icons are registered in the MatIconRegistry and displayed using the mat-icon component. However, I've observed issues with icons that utilize masks in Sketch ...

Attempting to integrate a three.js OBJLoader within an HTML canvas

My issue is quite straightforward: I attempted to connect a three.js script with an HTML canvas, but I was unsuccessful and now I'm unsure how to proceed. Here is the code I have (I've already loaded the necessary scripts in the HTML head): wi ...

Guide to displaying or hiding elements based on the number of selected checkboxes

When only one checkbox is checked, all buttons in the head-btn class should be displayed. By default, only the add folder and upload buttons are shown. If a user selects two checkboxes, the share button should be hidden. If they uncheck one of the checkbo ...

AngularJS allows users to import a file and submit it after closing the popup

I can't figure out how to submit the file I'm importing after clicking OK on the system's file upload window. Here is what I have tried so far: <input type="file" id="file-input" style="display:none" /> <button class="btn pull-ri ...

The issue of CORS not functioning properly has been encountered in a Cordova application connected to an Express

Running a Cordova app in the browser and attempting to fetch data using the Fetch API from a server running on a different port (Express). CORS has been allowed: app.options('*', (req, res) => { res.header('Access-Control-Allow-Origi ...

Looking for help combining HTML5 Canvas and JavaScript to showcase images. Can anyone lend a hand?

I am currently in the process of developing an Android game using HTML5 and Javascript. I have managed to make some progress, but I have encountered a problem that has left me puzzled. Initially, my JS file and Html file were functioning well together for ...

The jQuery mobile tap event triggers the vclick event

I have been developing a jQuery mobile application that needs to be functional on both mobile devices and PCs. To detect finger events, I am utilizing the jQuery Finger plugin (): $('body').on('tap', 'image', function(e) { ...

Tips for automatically sending data back to the server every two seconds using ASP.NET Web Form

My Textbox looks like this : <asp:TextBox runat="server" ID="Text1"></asp:TextBox> I need my Textbox to send data back to the server every two seconds using setInterval in JavaScript. ...

Flowtype: Utilizing type hints for class-based higher order component

I am currently working on typehinting a higher-order component (HOC) that adds a specific prop to a passed Component. The code snippet looks like this: // @flow import React, { Component } from 'react'; import type { ComponentType } from 'r ...

Tips for implementing event handlers on dynamically generated li elements in VueJS

Creating multiple ul elements using v-for in the following way <div v-for="item in info"> <ul> <li><a>{{item.number}}</a></li> <li><a>{{item.alphabet}}</a></li> </ul> </div&g ...

Tips for creating read-only checkboxes with multipledropdown.js in Angular.js

I am trying to make all checkboxes in a multiple dropdown list readonly using Angular.js with the multipledropdown.js plugin. My code snippet is as follows: <div class="col-md-6" ng-show="sub_sub_menu"> <div class="input-group bmargindiv1 col-md- ...

The concept of dynamic schema in Mongoose allows for flexibility and

Currently, I am working on creating a product schema that involves setting pricing in different currencies. However, I am facing confusion regarding how to dynamically create currency options. The pricing may vary in one currency or multiple currencies as ...

Is it possible to automatically adjust the text color to match the background color?

In my hypothetical scenario, I am part of a group chat where the owner has the ability to change the background color of the chat bubbles. Each user's username appears on top of their respective bubble in one of ten pre-assigned colors. However, not a ...

Altering documents post Bower installation

I took the initiative to manually download the css and js files for an angular module (here). In order to make a small adjustment, I modified the css (specifically changing max-width in the media query): Original: @media only screen and (max-width: 800px ...

JavaScript code to retrieve and store data from API endpoints

I am working with a Web API endpoint that provides the location of a URL (). When a button is clicked, this API is called and a URL is returned. The file format could be PDF, Excel, or Word. I am looking for a way to download the file and save it to disk ...

Incorporating PHP generated content into Dart without using Ajax

My current website is built using PHP (Laravel) on the server side and Javascript on the client side. Now, I am interested in replacing the Javascript with Dart. Currently, I inject data into the Javascript on the webpage like this: <script> va ...

Unique rewritten text: "Displaying a single Fancybox popup during

My website has a fancybox popup that appears when the page loads. I want the popup to only appear once, so if a user navigates away from the page and then comes back, the popup should not show again. I've heard that I can use a cookie plugin like ht ...