Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:05:39+00:00 2026-06-17T15:05:39+00:00

I need to display more text in the fullcalander. but the problem is i

  • 0

I need to display more text in the fullcalander. but the problem is i am getting data from the mySQL db as json data through ajax call. so i dont know the exact length of data which is coming. so i need to show the daily events in the fullcalendar dynamically in a loop. the following code i tried but i didnt got the output. can anyone help me. thanx in advance

var testJson = ['value1', 'value2'];
$('#full_calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    editable: true,
    events: [
        for(var i=0;i<2;i++){
            {
                title: ''+testJson [i],
                start: new Date(y, m, 3)
            }
    } ]
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:05:40+00:00Added an answer on June 17, 2026 at 3:05 pm

    2 things first:
    when you want to know the exact length of the recived data…. why not send them within the JSON object?

    e.g.

    var test = {"data":[1,2,3,4,5],"size":5}

    the second way to get the lentgh is the length field. Every javascript object has a length field. In the example above test.data.length would return 5 (as test.size would do).

    and i’m pretty sure you can’t run a iteration within a array declaration, so just build the array befor:

    var events = [];
    $(test).each(function(i, obj) {
        events[] = {title: test.data[i], start: new Date(y, m, 3)}
    }
    

    without jquery it would like this:

    var size = test.data.length;
    var events = [];
    for(var i =0; i < size; i++) {
        events[] = {title: test.data[i], start: new Date(y, m, 3)}
    }
    

    and then pass it to your function call

    $('#full_calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        editable: true,
        events: events
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We need to display some preview text from a larger string that can be,
I need to display image and one button on fancybox popup but I can't
I need to display short description like label and near it data associated with
I need to display the parent from the first Element of input.xml Also I
I need to implement an Android viewer to display a list of results (from
In my XML file chapters tag has more chapter tag.i need to display chapters
because I need to display something more than just a list in a Fragment.
I need to display multiple images from a database table and bind it to
<input type='text' name='one' id='oneID' maxlength=150> i need the JS to display the number of
I need to print a text with more lines on the command window. example:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.