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!

3
  • 1
    Looks like you are missing all the css. Commented Jan 19, 2017 at 15:52
  • @Christoffer Thanks! Any idea where I can find the CSS for a calendar?
    – ICW
    Commented Jan 19, 2017 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. Commented Jan 20, 2017 at 8:11

1 Answer 1

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 and acknowledge you have read our privacy policy.

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