Google calendar api - custom url / ico
I'm creating new events in a google calendar ( php API ) and I would like to link a new event to a 开发者_StackOverflow社区pdf I created online. This could be a link or ico I can click on in the google calendar.
Is this possible?
It is not possible to customize where your events link to from inside the actual Google Calendar app.
Instead, retrieve your calendar using the API and parse it in your own calendar. You can do whatever you want with it then.
For example, see this jQuery FullCalendar demo that retrieves the Gcal feed. By changing the eventClick
method, you should be on your way.
$(document).ready(function() {
$('#calendar').fullCalendar({
// US Holidays
events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic'),
eventClick: function(event) {
// opens events in a popup window
window.open(event.url, 'gcalevent', 'width=700,height=600');
return false;
},
loading: function(bool) {
if (bool) {
$('#loading').show();
}else{
$('#loading').hide();
}
}
});
});
精彩评论