Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedded Google calendar : how to set range of hours to display?

Given the following embedding code:

<iframe src="https://www.google.com/calendar/embed?
title=2014 PLIDAM International Symposium (Paris)&
dates=20140611/20140615&
mode=WEEK&amp;
showNav=1&amp;
showDate=1&amp;
showPrint=1&amp;
showTabs=1&amp;
showCalendars=0&amp;
showTz=1;
height=600&amp;
wkst=2&amp;
bgcolor=%23666666&amp;
src=vdfmfbp0msroletduigs2qtkoc%40group.calendar.google.com&amp;
color=%232952A3&amp;
ctz=Europe%2FParis" 
style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"></iframe>

Is there a parameter to set the hours to display/focus_on from 09:00 to 18:00 (6pm), aka the working hours ? Same for days, is there someways to just display/focus_on the rights 4 days only.

Fiddle here

like image 605
Hugolpz Avatar asked Feb 05 '14 23:02

Hugolpz


People also ask

Can Google Calendar be embedded?

Google Calendars can be embedded into a page or a text widget using their embed code. Go to Settings and Sharing in the Google Calendar you want to add (hover over the calendar you want to embed and click on the Options and select Settings and Sharing). Scroll down to the Embed code and copy the embed code.


1 Answers

There doesn't appear to be a way to do this through the API, currently. I would use javascript/jQuery to remove the elements you don't want to show in the DOM after the iframe has finished loading.

So, you could delete the Wednesday column, if you know the column index, by something like this:

$("tr").each(function() {
    $(this).filter("td:eq(3)").remove();
});

You can also scroll a specific div into view:

https://stackoverflow.com/a/4884904/5129424

$("#myImage")[0].scrollIntoView();
like image 50
TinkerTenorSoftwareGuy Avatar answered Oct 10 '22 14:10

TinkerTenorSoftwareGuy