Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Making Google Calendar Events Clickable Reply To: Making Google Calendar Events Clickable

#238769
Mottie
Member

If I had to guess, I think you want to add the same link that opens when you click inside the calendar to also work on the events at the bottom?

calendar

If so, use this code change (line 32) inside of your index.js file to do this:

Original

s = '<div class="eventdate"> ' + formatDate(eventdate, defaults.dateFormat.trim()) + ' - ' + summary + '</div>';

change it to:

s = '<div class="eventdate"><a target="_blank" href="' + item.htmlLink + '">' + formatDate(eventdate, defaults.dateFormat.trim()) + '</a> - ' + summary + '</div>';

This change will let the user click on the date. It will open a new browser tab to the Google calendar event.