-->

Is there a javascript calendar that takes an ical

2020-06-08 07:15发布

问题:

I am looking for a javascript based calendar that will allow me to specify a remote ical file to use as the source for the events.

I know google will allow you to import the ical then view the calendar via js or iframe, but I need to keep this agnostic to individual user accounts of any time.

Any suggestions?

Thanks

回答1:

If you have access to an "in between", you could probably do something with this (or a similar class in the language of your choice):

http://www.phpclasses.org/package/3278-PHP-Parse-and-extract-event-information-from-iCalendar.html

and jQuery Week Calendar, which is great:

https://github.com/robmonie/jquery-week-calendar

You would basically just convert the iCal format to JSON on the fly in a PHP script.



回答2:

This may not be a complete answer but I think it's a useful pointer in the right direction.


There's a project called jqcaldav, which is (as the name suggests) not exactly an iCalendar (ics) viewer but a CalDAV client. So far I haven't found a way to specify an ics URL to display directly.

However, since the CalDAV protocol uses the iCalendar format to store and communicate Calendar data, the jqcaldav project should contain some code to parse and display iCalendar Data. Maybe examining the code can be a useful exercise and lead to the development of a standalone ics viewer. I would also be highly interested in a working solution, but so far I haven't had time to put something together myself.

A quick analysis shows that there are indeed two files that are seemingly concerned with the iCalendar format: ical.js and jical.js. Examining the source code reveals that another file called ics-parser.js is used. Also, the calendar solution was apparently released under a CC-By-License, encouraging reuse in other projects.

If someone creates a project based on this, I'd glad to know of it or even join in.



回答3:

Here is a link on sourceforge to something. Not sure if it works but wanted to at least provide something. http://sourceforge.net/projects/jsicsparser/



回答4:

dhtmlx-scheduler does it but needs a proxy to unfold events with repetition.