Wednesday, September 23, 2015

Link to add an event to your google calendar

This is a common functionality you want to add to your event website that will help your users add the event schedule to their Google calendar. Simply using this following html syntax:

<a href="http://www.google.com/calendar/event?
action=TEMPLATE
&text=[event-title]
&dates=[start-custom format='Ymd\\THi00\\Z']/[end-custom format='Ymd\\THi00\\Z']
&details=[description]
&location=[location]
&trp=false
&sprop=
&sprop=name:
&ctz=[timezone]"
target="_blank" rel="nofollow">Add to my calendar</a>

For Example:

<a href="https://www.google.com/calendar/render?action=TEMPLATE&text=Vietnam+Tech+Conference+2017&dates=20170311/20170313&details=For+details,+link+here%3a+http://vietnamtechconference.org&location=Saigon+South+International+School,+Tân+Phong,+Quận+7,+Ho+Chi+Minh+City,+Vietnam&output=xml&ctz=Asia/Ho_Chi_Minh" target="_blank" rel="nofollow">
Add to my calendar
</a>


Reference: http://stackoverflow.com/questions/10488831/link-to-add-to-google-calendar