JSON formatting to hide Add New item button on SharePoint list calendar view

Mcintosh, Rebecca 256 Reputation points
2026-07-01T12:39:39.46+00:00

Hello!

How can I hide the Add New item button on a SharePoint list calendar view? User's image

This does not work and I want my users to use the integrated Form to add items to the list and not the native button (as that Form is customised via Power Apps to operate in a different way and does not support the additional of new items.)

The commandBarProps also does not seem to work for any of the buttons at all - why is this? This needs to be resolved as we should be able to control the views for both list and calendar views equally.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      {
        "key": "new",
        "hide": true
      },
      {
        "key": "editInGridView",
        "hide": true
      }
    ]
  }
}
Microsoft 365 and Office | SharePoint | Development
0 comments No comments

Answer accepted by question author
Michelle-N 20,735 Reputation points Microsoft External Staff Moderator
2026-07-01T13:49:26.54+00:00

Hi @Mcintosh, Rebecca

Based on your description, I understand that you are trying to hide the "Add New item" and "Edit in grid view" buttons on a SharePoint list Calendar view using JSON view formatting. However, the commandBarProps JSON code you provided is not hiding the buttons as expected, and you need this resolved so users are forced to use your integrated Power Apps form instead.

I tested the exact JSON payload you shared in my environment, and it actually worked perfectly to hide both buttons on a Calendar view. Because it is working as intended out-of-the-box, the issue might be related to how or where the JSON is being applied.User's image

To help narrow this down and resolve the issue, could you check a few things for me?

  1. Verify the Current View: Please double-check that you are actively applying and saving this JSON to the Calendar view itself and not accidentally editing a different list view (like the All Items view). You can ensure this by switching to the Calendar view first, clicking the view dropdown menu, selecting Format current view, switching to Advanced mode, pasting your code, and hitting Save.
  2. User Cache vs. Creator View: When you click Save in Advanced mode, do the buttons disappear for you immediately on the screen, but still show up for your users? Or do the buttons remain visible for everyone, including yourself, even after saving and refreshing the page?
  3. Test on a Clean List: If you create a brand new, clean SharePoint list, set up a temporary Calendar view, and apply this exact same JSON, does the button successfully disappear there? This will help us determine if there is a conflict with existing customizations on your current list.

Let me know what you find after checking these steps, and we can troubleshoot further!


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Oldest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.