0

I am attempting to add a calendar to my Default.aspx in my sharepoint hosted add-in in visual studio. I used the default code-snippet for adding sharepoint lists. Here's what I added to my Default.aspx:

<WebPartPages:WebPartZone runat="server" FrameType="Default" ID="full" Title="loc:full">
    <WebPartPages:XsltListViewWebPart runat="server"
        ListUrl="Lists/Calendar"
        IsIncluded="True"
        JsLink="clientTemplate.js"
        NoDefaultStyle="TRUE"
        PageType="PAGE_NORMALVIEW"
        Default="False"
        ViewContentTypeId="0x">
    </WebPartPages:XsltListViewWebPart>
</WebPartPages:WebPartZone>

and this is the result...

enter image description here

Pretty dang ugly if you ask me. How can I get this looking like a normal share point calendar instead of an unusable mess?

Thank you!

  • 1
    Looks like you are missing all the css. – Christoffer Jan 19 '17 at 15:52
  • @Christoffer Thanks! Any idea where I can find the CSS for a calendar? – YungGun Jan 19 '17 at 15:56
  • For the simplicity, i would include SharePoint core15 CSS as all the calendars styling are included there. To me it looks like you are missing other important controls, like the ability to sort between months. – Christoffer Jan 20 '17 at 8:11
0

Create an OOTB page in SharePoint site and add a calendar webpart in the page. Save this page.

Open the page in SharePoint Designer and copy the calendar webpart related code. Place the copied code in your default.aspx page.

This might be helpful.

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.