I'm trying to have my events list display as a calendar view in a Sharepoint-hosted app written using JavaScript and the Client Side Object Model.

Here's the code I'm using.

From Default.aspx:

<WebPartPages:WebPartZone runat="server" FrameType="None" ID="CalendarWebPart" />

From the Elements.xml associated with Default.aspx:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Pages">
<File Path="Pages\ClientWebPart.aspx" Url="Pages/ClientWebPart.aspx" ReplaceContent="TRUE" />
<File Path="Pages\Default.aspx" Url="Pages/Default.aspx" ReplaceContent="TRUE">

List="Lists/Paid Time Off List"
          <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
                  <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
                  <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                      <property name="Title" type="string">My Calendar</property>
                      <property name="InplaceSearchEnabled" type="bool">False</property>
                      <property name="ShowToolbarWithRibbon" type="bool">False</property>


I see this even though BaseViewID="2" definitely is my calendar view:

List View

I expected a calendar view like this (this is the calendar for my events list, from /Lists/Paid Time Off List/Calendar.aspx):

Calendar View'

Any idea why the Calendar view isn't working inside of my webpart, but works fine when I go to the page for the calendar view?

Note: My code is based on the code found here: http://www.greggalipeau.com/2013/12/25/adding-list-views-to-sharepoint-2013-apps/

Maybe this is a potential solution, but I don't understand the process this author is proposing: http://cameron-verhelst.be/blog/2013/03/24/sharepoint-2010-calendar-view-on-xsltlistviewwebpart/

2 Answers 2


You should also check the properties of your view. You reference the version which is only suitable for SharePoint 2010 for SharePoint 2013 you need to change these to This:

           Culture=neutral,PublicKeyToken=71e9bce111e9429c" />

needs to be changed to:

           Culture=neutral,PublicKeyToken=71e9bce111e9429c" />

author from the linked blogpost here.

My solution was to use a different class (ListViewWebPart insteaad of XSLTListViewWebPart). Where I did it in code, you can do it in CAML/XML:


<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
    <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
    <Title>Pending Registrations</Title>

As you can see, the XML is a little different, so you'll have to look around how to set the view etc. on this type of webpart. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.