In this article we can explore a SharePoint Page Customization Scenario. Please note that this falls into the responsibility of a SharePoint Designer.
Following are the tools which we use to achieve the modification:
- SharePoint Designer 2010
- Internet Explorer
What is Calendar View?
View is a visual way of viewing documents or list items based on a Date
column. We can enable Calendar view for Library as well as List.
Create a new Document Library
article, create a new Document Library and name it as My Calendar Docs.
documents to the above Library.
create a new Calendar view for the above library using Library > Create View
calendar properties as shown below:
calendar has the following views:
- Month View
- Week View
- Day View
view can be displayed using the respective buttons from the Calendar View.
Following is our library after enabling the Calendar View.
see the Time is displayed in the Calendar Item. Our challenge is to hide the
Time part, which is not configurable in the usual way.
see how to achieve this.
Open in Internet Explorer
Calendar View in Internet Explorer and select Tools > Developer Tools. In
the appearing dialog click the Left Arrow as shown below:
the mouse over Calendar control and you will get the Time div highlighted.
the Developer Tools dialog, you can see the HTML elements as shown below:
class name is ms-acal-sdiv and there is a Text element denoting time.
above HTML elements are contained in the Calendar View.aspx page. We can edit
this page using SharePoint Designer.
Open SharePoint Designer
the Site Actions > Edit in SharePoint Designer option to continue. If you
do not have SharePoint Designer installed you need to install it first.
SharePoint Designer, navigate to Lists and Libraries, My Calendar Docs, Calendar View.
editing the Calendar View page now.
the Advanced Mode button from the tool bar. Now locate
the following section as given below: (You can refer to the line number as
Below the last line, add the following section:
Now the entire section looks like below:
the changes and you can refresh the page in browser. You should get the Time
part hidden as shown below:
even change the color of the Div using following code:
After the modification, refresh
your browser window.
see that the back color of the calendar changed.
pushing the text to left side, instead of hiding it. Depending on the
scenarios we can perform different solutions as:
the div using display: none
color of div
Text to empty
DIV ID and Class
Please note that DIV
Id and DIV Class are different. Id will be targeting a unique element but
Class will be targeting a set of elements.
In our example we
were targeting DIV Class so that multiple elements will be targeted for change
Customizing pages decreases page performance and might impact your SharePoint Governance rules. I recommend you consult with your SharePoint Administrator before
performing such customizing page activities.
In this article we have seen how to use SharePoint
Designer to edit an existing Calendar page. In real world scenarios this
knowledge would be useful.