Issue 1313: iCal (ics) support
Status:  ExportedToGithub
Owner: ----
Closed:  Aug 2015
Reported by andrewmc...@gmail.com, Feb 22, 2012
Would be great if we could import ics files or if there was some documentation on how to do so.
Oct 11, 2012
#1 quentin....@gmail.com
Definitely. I need a ics webcalendar viewer for my local intranet.
Jun 19, 2013
#2 r...@mudie.me
Had great hopes for this but like others I need ICS support.
Jun 28, 2013
#3 SimonSimCity@gmail.com
Or are there at least approaches to make the FullCalendar compatible with jCal?
I first heard of jCal when reading the documentation to the new version of the Sabre VObject Project (https://github.com/fruux/sabre-vobject/blob/master/doc/usage_3.md).

It looks like a Json-view of the iCalendar data ...

Any plans on supporting either iCalendar (ics) or jCal?
Jul 28, 2013
#4 eleco...@gmail.com
I do this whith a read external ics-file, ics transform in json, json passed through a php script which transform json into a array to create my own events...
Jul 28, 2013
#5 eleco...@gmail.com
I do this whith a read external ics-file, ics transform in json, json passed through a php script which transform json into a array to create my own events...
Aug 13, 2013
Project Member #6 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Accepted
Labels: -Type-Enhancement Type-Feature
Aug 15, 2013
Project Member #7 adamrs...@gmail.com
 Issue 1475  has been merged into this issue.
Dec 12, 2013
#8 andyshaf...@gmail.com
ICS support would be great! +1 (times the 100+ public calendars I manage)
Dec 17, 2013
#9 hector.m...@gmail.com
Hello everyone,

I did the transformation ics --> json, and through php into an array, but still doesn't work...

What did you put exactly in the html file referring to the created array?

Thank you very much in advanced.
Kind regards.

Héctor Moreno

Mar 21, 2014
Project Member #10 adamrs...@gmail.com
 Issue 62  has been merged into this issue.
Jun 22, 2014
#11 mahbub.e...@gmail.com
Hi everyone

Do you have any work on how to convert Full-Calendar data into *.ics format? Please help in this regard.

Thank you
-- Mahbub
Sep 5, 2014
Project Member #12 adamrs...@gmail.com
 Issue 2273  has been merged into this issue.
Nov 17, 2014
#13 eleco...@gmail.com
Example to import ICS file into fullcalendar event

include : jquery.ics-0.3.js (google is your friend)

in your js file : 

$.ajax({
            type: 'POST',
            contentType: "application/json",
            url: *****ics file*****,
            dataType: "json",
            async: false,
            success: function(result) {
                var cal, icalevents, dtstart, dtend, StrStart, StrEnd, StrID, StrAllDay, StrTitle, StrURL, StrLocation, StrDescription;
                $.each(result, function(key, val) {
                    try {
                        cal = $.parseIcs(val.url, AEFC.urls.externalfile);
						Alertify.log.success('ICS '+val.url);
                        icalevents = [];

                        for (i = 0; i < cal.event.length; i = i + 1) {
                            dtstart = cal.event[i].dtstart[0].value;
                            StrStart = dtstart.substring(0, 4) + '-' + dtstart.substring(4, 6) + '-' + dtstart.substring(6, 8);
                            if (dtstart.substring(9, 11) !== '') {
                                StrStart = StrStart + 'T' + dtstart.substring(9, 11) + '-' + dtstart.substring(11, 13) + '-' + dtstart.substring(13, 15);
                            }

                            dtend = cal.event[i].dtend[0].value;
                            StrEnd = dtend.substring(0, 4) + '-' + dtend.substring(4, 6) + '-' + dtend.substring(6, 8);
                            if (dtend.substring(9, 11) !== '') {
                                StrEnd = StrEnd + 'T' + dtend.substring(9, 11) + '-' + dtend.substring(11, 13) + '-' + dtend.substring(13, 15);
                            }

                            StrAllDay = StrStart.indexOf("T") === -1;
							
							if (cal.event[i].uid !== "undefined") { StrID = 'ICS'+AEFC.nbcalendars+'#'+cal.event[i].uid[0].value ;} 
							if (cal.event[i].summary !== "undefined") { StrTitle = cal.event[i].summary[0].value;} 
							//if (cal.event[i].url !== "undefined") { StrURL = cal.event[i].url[0].value;} 
							//if (cal.event[i].location!== "undefined") { StrLocation = cal.event[i].location[0].value;} 
							//if (cal.event[i].description !== "undefined") { StrDescription = cal.event[i].description[0].value;} 
							
                            icalevents.push({
                                id: StrID,
                                title: StrTitle,
                                url: StrURL,
                                start: StrStart,
                                end: StrEnd,
                                allDay: StrAllDay,
                                location: StrLocation,
                                description: StrDescription,
								editable:false,
								className: val.className,
								color: val.color,
								textColor: val.textColor
                            });
                        }
                        AEFC.source[AEFC.nbcalendars] = {
                            events: icalevents
                            //className: val.className,
                            //color: val.color,
                            //textColor: val.textColor
                        };
                    } catch (err) {
                        Alertify.log.error("ERROR loading (" + val.url + "): "+err);
					}
                });
            }
        }); // $.ajax(
Jul 30, 2015
#15 studiopo...@gmail.com
What do you define as your eventSource in fullCalendar when using this script to retrieve an ics file? 
Aug 21, 2015
Project Member #16 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/1580

This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event.

Happy coding,
Adam
Status: ExportedToGithub