Skip to main content

Small Calendar for SharePoint 2010 & 2013

First off I would like to apologize for the lack of posts. I have been really busy with my new role as the UX Design lead within Slalom Consulting Boston. I will share more about that in another post.

In a previous post Create Really Small Calendar I showcased how to do this for SharePoint 2007. However the 2010 and 2013 calendar views have changed and therefore we cannot use the same method or CSS as 2007.

SharePoint 2010 Small Calendar:
image

SharePoint 2013 Small Calendar:
image

See video below for a video walk through on how to create a small calendar for SharePoint 2010 and & SharePoint 2013 with just CSS.

Per the video above here is the code that I referenced:

2010 CSS link reference in Master Page:
<SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/smallcalendar.css %>" After="corev4.css" runat="server"/>

2010 CSS:
/**** Small Calendar ***/
.ms-acal-item{height: 10px !important;}
.ms-acal-sdiv,
.ms-acal-mdiv,
.ms-acal-ctrlitem,
.ms-acal-month-weeksel,
.ms-acal-title{display: none;}
.ms-acal-summary-itemrow TD DIV{height: 15px !important;}

2013 Content Editor Web Part CSS:
<style>
/**** Small Calendar ***/
.ms-acal-item{height: 10px !important;}
.ms-acal-sdiv,
.ms-acal-mdiv,
.ms-acal-ctrlitem,
.ms-acal-month-weeksel,
.ms-acal-title,
.ms-acal-month-top span{display: none;}
.ms-acal-summary-itemrow TD DIV{height: 15px !important;}
</style>

Thanks & Enjoy!

Comments

Thakhi Shaik said…
This comment has been removed by the author.
Erik Swenson said…
Thakhi, I have not tried this but I bet you could absolute or relative position the color blocks over the dates and set the z-index to go under the numbers.
Thakhi Shaik said…
This comment has been removed by the author.
williams said…
Thanks you Erik
for the very useful calendar small,
as should make a css for a small newsfeed

jebz said…
Hey, Erik, thanks so much for sharing! I just wanted to share this extra css statement that I use to get rid of the "Add" button that appears when you hover.

.ms-acal-vlink a{display:none;}

Not sure if it works in 2010, but I am using it in 2013.

I am also wondering, what do you, personally, do about the click events that fire when a user clicks on the day of the month (6,7,8...)?
Unknown said…
I have a problem. If you have more than one event for a day, only the first event is showing if the height specified in .ms-acal-item is too small. The following events aren't even loading.

Any solution or suggestion for how to solve this?
Erik Swenson said…
Joakim, that is a known limitation with this simple approach. I have tried many times to show the other events in a condensed view but the way the event items are positioned it is impossible for the containing element to know there are more elements. You could remove the .ms-acal-summary-itemrow TD DIV{height: 15px !important;} height but then you would have a very tall and thin calendar.
Unknown said…
Hi Erik

Thanks a lot for your post, it was very helpful for rendering my SPCalendar. The only bug i still get is when clicking on Prev/Next Button the events have the old layout and won't match to the calendar grid anymore. After re-sizing the page they match again. Do you have any idea how to get rid of this bug?
Thanks,Corina
Unknown said…
Hi,
is it possible that the day numbers dont have a link?
So that the day view dont open when I click on a number.

Thanks
Unknown said…
Hi,

Is It possible to get Event Title and Description or any other things on "Mouse Hover" in SharePoint 2013 Calendar Template?

Thanks in Advance.
Baldo said…
Great post!

But, when I use this css for sharepoint 2013 this runs perfectly in IE9 and Chrome. But when I use this code in IE11, no runs correctly. I need put IE11 in compatibilty mode view. Any Idea?

Thank you!
Unknown said…
Hi Erik,

Back to this point. When you have two calendar events on the same day, there is a space between the calendar items and I can't find a way to remove it. Any chance you know? Your video has been really helpful so far.

Thanks,

Tom
Mike Malloy said…
Nice work! Do you know a way of forcing the web part to show a specific month? I want to add 12 web parts to one page so I can see the same calendar with all 12 months exposed at once.

Popular posts from this blog

How To: Create Hyperlink to Modal Pop-Up Form

I was asked by a client recently if there was a way to create a hyperlink to a New Item Form anywhere within a site but still get the rich experience of the Modal pop-up window that grays out the background. (Note this is for SharePoint 2010 Only…) I basically took the code directly from the “Add new item” and the “Add Document” link within the list view. What this allows you to do is simply add in the following code to any content editor web part, Master page, or Page Layout in any site collection and display the form to be filled out. The user will get the nice experience of the modal window and not have to navigate away from their current page. This could be used for example a feedback form that is included in the master page so whenever someone wants to give feedback it is always going back to a central list. The only that is required for you to know is the List ID and the site name. Full Code For a List Item: <a onclick="javascript:NewItem2(event, &quot

SharePoint 2010 Base CSS Classes

This will be the first of many SharePoint 2010 posts. I will be focusing on a few of the main CSS classes used for SharePoint 2010 Public Beta. As the product becomes more final there might be some changes to the class names but I will be sure to create a new post if that happens. This will be quite a lengthy but it should be helpful. The default CSS given below are just highlights of the full CSS attributes for that class. I will be using a basic team site as my base for the screenshots. Here is a basic structure of the main areas that I will cover. Ribbon Row Table Row Left Site Actions Navigate Up Edit Tab List Browse Page Table Row Right Give Feedback Welcome Menu Workspace Body Container Title Row Title

SharePoint 2013 Responsive Table Columns

I have been wanting to write this one for a while now. It is really amazing how UX is really finding is way into everything that we use and interact with. From Custom applications both mobile and on a desktop to document management or large data visualizations. There is always room for better usability and new concepts. SharePoint lists and library functionality really has not changed much for the past 10 years... I remember back in 2003 when I saw the same table/grid based views of documents and list items that exists in SharePoint 2013. But now we can look at them in a whole new way! In this video blog you will see how to create a responsive CSS table so that when the browser size is reduced it will hide specific columns. However hiding data is not always the right thing to do. What if a user needed those columns to filter on or to use for comparison to another document? Well that is where the custom jQuery Column chooser comes in. It allows you to see what columns are displ