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

Bypass the typical practice of choosing input with javascript

I have a form with a select input that has a dropdown list of options. The requirement is that when the select input is clicked, I need to validate the form. If the form is incomplete, I want to prevent the select input from showing the option list. Howeve ...

Guide for utilizing ajax and php to establish a connection with a mysql database when developing with phonegap

I am currently developing a phonegap application and I'm facing an issue with displaying content from MySQL. Since I can't use PHP pages in phonegap, I decided to utilize web services in HTML for connecting to MySQL. However, my Ajax web service ...

Validation of VAT numbers using JavaScript instead of PHP

I came across an interesting function at this link that is used for checking VAT numbers in the EU. However, I am struggling to integrate it with my registration form. I would like to convert it into a JavaScript function so that I can validate the number ...

The predicament encountered with user registration in the realm of Node.js

I am encountering a problem with the sign-up route in node.js and MongoDB. Whenever I attempt to post data using Insomnia, it displays an error message. You can find the screenshot of the error [here](https://i.stack.imgur.com/qnGAv.png). Here is the code ...

Using Rails: The Art of Safely Managing JavaScript code when working with AJAX on the client-side

How can I securely send a collection via to_json directly from the controller action to the client-side? When the request is sent from the controller action straight to the client-side without pre-processing, the process looks like this: An AJAX requ ...

The integration of a side panel with a chrome extension is experiencing issues

I am working on a chrome extension with the following functionalities - Extract URL path from a specific webpage. (The webpage's URL remains constant) Open this URL in a new tab. It can be either http:// or https://. Embed an iframe containing a sim ...

Utilizing IISNode and/or nodemon for efficient node.js development on Windows platform

For my node.js application running on Windows, I currently utilize IISNode both locally during development and on production hosting. Would incorporating nodemon (or a comparable module that monitors file changes and restarts node.exe when necessary) pro ...

Revoke the prior invocation of the Google Maps geocoding function

While working on implementing an autocomplete with JavaScript and the Google Maps geocode method (using the keyup event on input), I have encountered a problem where I sometimes receive the results of the previous search instead of the current one. I am l ...

The success callback method is no longer correctly referencing the variable due to a change in the AJAX request

Imagine you have a table in your HTML file with the following rows, where {{ }} represent variables: <tr id="{{ object.id }}"> <td class="name">{{ object.name }}</td> </tr> <tr id="{{ object.id }}"> <td class="nam ...

The console experienced a forced reflow when a tooltip appeared on the slider handle while executing JavaScript

I am currently facing an issue with my web page that includes various elements along with the Ant.design slider. The values of the slider are being controlled through React states. However, I have noticed that when the slider tooltip is enabled, the respon ...

tips for exporting database information to an excel file with the help of ajax request and javascript

Recently, I built an application using NDWS with sapui5 _javascript. Within the application, there is a table that contains data synced with the server's database. My goal is to retrieve this data from the table and export it to an Excel document. Her ...

Modify variables in the child function to be utilized in the parent function

I need to create a scenario where a variable defined in a parent function is modified within a child function and then returned back to the parent as an updated variable. Here is the code I have attempted: let value = 20; console.log(value); // Output: ...

How can I show all the dates within a range of two dates using AngularJS?

How can I select "From" and "To" dates from a datepicker in AngularJS and display all the dates in between them in tabular form? ...

Preventing the $_POST action value from being altered to match the ajax page path

My current setup involves using php, jquery, and ajax to update a particular section. The ajax call is executed successfully, but I encounter an issue where the global $_SERVER[SCRIPT_NAME] changes to match the ajax path when the requested data is returned ...

Using Angular 1.4 - How to utilize a single controller with $routeProvider

How can I use the same controller on both full and mobile views using $routeProvider? The code below does not work as expected. What am I missing? Alternatively, is it possible to have the same controller but with different templateUrl based on the user a ...

Attempting to create a JavaScript calculator from scratch

After spending hours typing and debugging my code for a school assignment, I have created a calculator that still isn't working. I'm hoping someone can help me find the errors in my code. function myStory() { window.alert ("Very doge"); } // ...

Reorganize a list based on another list without generating a new list

Among the elements in my HTML list, there are items with text, input fields, and tables. I also have a specific order list like [3,1,2,0]. Is it feasible to rearrange the items in the HTML list on the page based on this order list without generating a new ...

Unable to retrieve button value with material-ui package

My task requires me to retrieve the value of a button, as it contains an ID essential for further steps. Initially, I used a standard button with Bootstrap styling and everything functioned correctly. <button value={row.vacationRequestID} c ...

Hover over or click to automatically focus on the input field

I have an icon that triggers focus on an input field when hovered over. I also want the same functionality to occur when the user clicks on the icon. if(!mobile){ $('#search-icon').hover( function(){ if($('.sear ...

Exploring the best practices for organizing logic within Node.js Express routes

I'm currently utilizing the https://github.com/diegohaz/rest/ boilerplate, but I am unsure about the best practice for implementing logic such as QR code generation and additional validation. My initial thought was to include validation and password ...