Forum Discussion
Calendar Overlay not possible in Sharepoint Online?
- Nov 15, 2019
0123456789 You are halfway there, if I understand what you are trying. You've got your individual calendar views on your list, that's the first step.
Overlays can only be done on a calendar list, not on a generic list that happens to have some calendar views.
Go to site contents and create a calendar list, or use the Event list if one has already been created. It's basically a calendar list with a modern front end. On that calendar view you'll see the 'calendar overlay' button there. You should be able to add your other list views to this to get your color coding.
Robin Nilsson Hi Robin. I'm hoping you might be able to help me with one other calendar-related issue. In the month view, there is a timestamp above the title. I don't include the time in any of my date columns so they all say 12:00 a.m - 12:00 a.m. I've attached a screenshot if it helps to understand the situation. Anyway, any idea how I can get rid of the time? I don't see it listed as an option.
0123456789 That one is more difficult. I've only used it on classic view on SP2013 on premise, so not sure it will work with SharePoint online. The calendar entries are async so it's more difficult to code for. To the calendar page I added a script editor and included this. It removes the time AND it expands the calendar to show everything, not just the first 3 events.
<script src="/Javascript/JQuery/JQueryMin-1.11.1.js"></script>
<script type="text/javascript">
// this version works faster, but there's a memory leak - the IE memory
// keeps growing. Change it from 100 to 1000
// and if you get to a month that has no items, it turns off the expand.
// remove the expandCheck.
// this works in Chrome
var $si;
var $sii;
_spBodyOnLoadFunctionNames.push("ready");
function ready()
{
ExecuteOrDelayUntilScriptLoaded(init, "sp.ui.applicationpages.calendar.js");
}
function init()
{
$si = setInterval(expandAll, 1000);
// $sii = setInterval(expandCheck, 2000);
}
function expandAll()
{
var $a = $("a.ms-cal-nav");
if($a.html() != null)
{
$a.each(function(i){
if($(this).text().indexOf("more")>-1)
{
$(this).find('img').trigger("click");
}
});
}
$('div.ms-acal-ctrlitem').hide();
$('div.ms-acal-time').hide();
$a = '';
}
function expandCheck()
{
var flag = true;
var $a = $("a.ms-cal-nav");
if($a.html() != null)
{
var len = $a.length;
for(var i=0; i<len; i++)
{
if($a.eq(i).text().indexOf("more")>-1)
{
flag = false;
}
}
if(flag)
{
clearInterval($si);
clearInterval($sii);
}
}
}
</script>
- 0123456789Nov 18, 2019Brass ContributorThank you!