lricardo27 / fullcalendar-asp-net

Automatically exported from code.google.com/p/fullcalendar-asp-net
0 stars 0 forks source link

events not being displayed on latest version of jquery 1.6.2 #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi All,

I have fully tested this app/plugin separately from the web app I'm going to 
implement it in, it works great...

Now I'm trying to implement it into my web app and it seems that the latest 
version of jquery (1.6.2) is not allowing the events to be displayed for some 
reason.

I have tested this many times, both with the latest version of fullcalendar and 
with the fullcalendar plugin downloaded from this app, no dice.

Everything works fine, i.e. adding events, etc.. and displaying the calendar 
are all working... the events just don't display.

Any help would be much appreciated.. I'm soo close!

Thanks,

-Drew

Original issue reported on code.google.com by mcminn.d...@gmail.com on 30 Sep 2011 at 9:20

GoogleCodeExporter commented 8 years ago
According to the FullCalendar site only 1.5.2 has been tested.

But, if you know the answer can you please post it here.  I'm in the same 
boat--I've got a cool use of this ready to go but if I can only figure this out!

Original comment by paulste...@gmail.com on 13 Oct 2011 at 8:07

GoogleCodeExporter commented 8 years ago
I think it's on json response file, maybe response isn't a correct response

Original comment by domenico...@gmail.com on 20 Apr 2012 at 4:55

GoogleCodeExporter commented 8 years ago
I upgraded FullCalendar to 1.5.3 and I am using JWuery 1.7.1 and JQuery UI 
1.8.17.

Ran into the same issue of the events not showing/loading. I am posting this 
here as a late response just in case more people run into the same issue.

The problem seems to exist with the json generation in the ProcessResponse()

Here is my fix:

        public void ProcessRequest(HttpContext context)
        {
            //MUST SET CONTENT TYPE TO TEXT
            context.Response.ContentType = "text/plain";

            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<int> idList = new List<int>();
            List<ImproperCalendarEvent> tasksList = new List<ImproperCalendarEvent>();

            //Create a json serializable object for each of our events
            foreach (CalendarEvent cevent in EventDAO.getEvents(start, end))
            {
                tasksList.Add(new ImproperCalendarEvent
                        {
                            id = cevent.id,
                            title = cevent.title,
                            start = ConvertToTimestamp(cevent.start).ToString(),
                            end = ConvertToTimestamp(cevent.end).ToString(),
                            description = cevent.description
                        }
                    );
                idList.Add(cevent.id);
            }

            context.Session["idList"] = idList;

            //use the Miscrosoft JSON Serializer to generate the output correctly
            System.Web.Script.Serialization.JavaScriptSerializer oSerializer =
             new System.Web.Script.Serialization.JavaScriptSerializer();
            string sJSON = oSerializer.Serialize(tasksList);

            //Write the JSON to the response object
            context.Response.Write(sJSON);
        }

Original comment by Sean.B.C...@gmail.com on 22 Apr 2012 at 10:44

GoogleCodeExporter commented 8 years ago
In addition to the above, I have just tried JQuery 1.7.2 and JQuery UI 1.8.19 
and it works!

Original comment by Sean.B.C...@gmail.com on 22 Apr 2012 at 10:48

GoogleCodeExporter commented 8 years ago
Attaching my updated code behind file

Original comment by Sean.B.C...@gmail.com on 22 Apr 2012 at 11:20

Attachments: