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 6200573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:23:33+00:00 2026-05-24T04:23:33+00:00

Events is not rendering in FullCalender? var calendar = $(‘#calendar’).fullCalendar({ theme: true, header: {

  • 0

Events is not rendering in FullCalender?

var calendar = $('#calendar').fullCalendar({
    theme: true,
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    //events: '/MyCalender/JsonResponse.ashx',
    events: [{id: '1',title: 'Event1',start:  1312462800,end: 1312462800,allDay:false,description: 'Event1'},{id: '3',title: 'Event2',start:  1309890600,end: 1309890600,allDay:true,description: 'Event2'},{id: '4',title: 'Event5',start:  1311705000,end: 1311705000,allDay:true,description: 'Event5'},{id: '5',title: 'Event3',start:  1310927400,end: 1310927400,allDay:true,description: 'Event3'},{id: '6',title: 'Event4',start:  1310495400,end: 1310495400,allDay:true,description: 'Event4'},{id: '7',title: 'Time Event1',start:  1312144200,end: 1312174800,allDay:false,description: 'Time Event1'}],
    ..other parameter            
        ...
});

I am using the following code (ashx file ) to call the events data..

public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "application/json";

        DateTime start = new DateTime(1970, 1, 1);
        DateTime end = new DateTime(1970, 1, 1);

        start = start.AddSeconds(double.Parse(context.Request.QueryString["start"]));
        end = end.AddSeconds(double.Parse(context.Request.QueryString["end"]));


        String result = String.Empty;

        result += "[";

        List<int> idList = new List<int>();
        foreach (CalendarEvent cevent in EventDAL.getEvents(start, end))
        {
            result += convertCalendarEventIntoString(cevent);
            idList.Add(cevent.id);
        }

        if (result.EndsWith(","))
        {
            result = result.Substring(0, result.Length - 1);
        }

        result += "]";
        //store list of event ids in Session, so that it can be accessed in web methods
        context.Session["idList"] = idList;

        context.Response.Write(result);
    }

    private String convertCalendarEventIntoString(CalendarEvent cevent)
    {
        String allDay = "true";
        if (ConvertToTimestamp(cevent.start).ToString().Equals(ConvertToTimestamp(cevent.end).ToString()))
        {

            if (cevent.start.Hour == 0 && cevent.start.Minute == 0 && cevent.start.Second == 0)
            {
                allDay = "true";
            }
            else
            {
                allDay = "false";
            }
        }
        else
        {
            if (cevent.start.Hour == 0 && cevent.start.Minute == 0 && cevent.start.Second == 0
                && cevent.end.Hour == 0 && cevent.end.Minute == 0 && cevent.end.Second == 0)
            {
                allDay = "true";
            }
            else
            {
                allDay = "false";
            }
        }
        return "{" +
                  "id: '" + cevent.id + "'," +
                  "title: '" + HttpContext.Current.Server.HtmlEncode(cevent.title) + "'," +
                  "start:  " + ConvertToTimestamp(cevent.start).ToString() + "," +
                  "end: " + ConvertToTimestamp(cevent.end).ToString() + "," +
                  "allDay:" + allDay + "," +
                  "description: '" + HttpContext.Current.Server.HtmlEncode(cevent.description) + "'" +
                  "},";
    }


    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

    private long ConvertToTimestamp(DateTime value)
    {
        long epoch = (value.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
        return epoch;
    }  
  • 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-05-24T04:23:34+00:00Added an answer on May 24, 2026 at 4:23 am

    solve using following code.

    context.Response.ContentType = "application/json";
    
    DateTime start = new DateTime(1970, 1, 1);
    DateTime end = new DateTime(1970, 1, 1);
    
    start = start.AddSeconds(double.Parse(context.Request.QueryString["start"]));
    end = end.AddSeconds(double.Parse(context.Request.QueryString["end"]));
    
    List<EventClass> listCalender = EventDAL.getEvents(start, end);
    
    System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer();
    context.Response.Write(js.Serialize(listCalender));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an events calendar written in PHP, with the following pagination script that
I am trying to use a JSON feed to render events in fullCalendar. Here
There are two threads. One is an events thread, and another does rendering. The
I have a GridView with dynamically created image buttons that should fire command events
I have an IE bug that I'm not sure how to fix. Using jQuery
I have to send planned support notification emails on system events (service window, alerts,
Qt's graphics view frameworks is very powerful, but I have not found a way
I have successfully converted the FullCalendar into asp.net / VB and it works perfectly.
I want to make sure I am using OpenGL for 2d rendering, but SDL
In my application I'd like to forward mouse and keyboard events to an invisible

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.