SoftwareTester
SoftwareTester

Reputation: 1090

How to control calendar options while opening using GAS

I'm playing around with activating Google Services from GAS using an UiApp.

This can be achieved by using an anchor, with or without an image of a button

How to show an email message content using GAS shows how an email can been shown this way.

Now I would like to use the same technique for displaying a calendar.

var calendarUrl     = 'https://www.google.com/calendar/render?tab=mc';
var calMainUrl      = 'https://www.google.com/calendar/[email protected]'
var calHolidaysUrl  = 'https://www.google.com/calendar/embed?src=en.dutch%[email protected]';
var calBirthdaysUrl = 'https://www.google.com/calendar/embed?src=%[email protected]';

   var url = calendarUrl;  // or any of the other urls above
   app.createAnchor('Open Agenda', url);

It works, but I would like to get control over the various possibilities of the calendar shown, like starting in '2 weeks' view or 'not showing hours between 0 and 7'

Does anybody know what (and how) parameters can be provided to the url?

Upvotes: 0

Views: 90

Answers (1)

Serge insas
Serge insas

Reputation: 46794

There are a few options implicitely described in the Google Calendar parameters... see screen captures below (sorry this is in french maar u zal waarschijnlijk begrijpen). When you change options there you can see the result in the HTML block shown on the parameter page.

enter image description here

clicking this leads to this screen :

enter image description here

Upvotes: 1

Related Questions