Skip to content

Commit 803ec32

Browse files
Merge pull request SharePoint#8747 from pKalaga/patch-2
highlight prerequisite step needed for formatting
2 parents 0e6450c + 0dec5a8 commit 803ec32

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/declarative-customization/view-calendar-formatting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Format calendar view to customize SharePoint
33
description: Customize calendar views in SharePoint lists and libraries
4-
ms.date: 12/23/2022
4+
ms.date: 02/09/2023
55
ms.localizationpriority: high
66
---
77

@@ -16,11 +16,11 @@ Groups the command bar customization options. For details on `commandBarProps`,
1616
## See also
1717
- [Command bar customization syntax reference](./view-commandbar-formatting.md)
1818

19-
### List setup before creating a calendar view and applying a JSON formatting
20-
21-
Before creating a new calendar view, a list should include all the required columns to be used in any JSON formatting.
22-
23-
After creating a calendar view, if more columns are required, go to the [List Settings page](https://support.microsoft.com/office/edit-list-settings-4d35793b-246e-42a3-990c-563a83795b7f) to create and add them to a calendar view.
19+
> ![IMPORTANT]
20+
> **Pre-requisite : List setup before creating a calendar view and applying a JSON formatting**
21+
>
22+
> - Before creating a new calendar view, a list should include all the required columns to be used in any JSON formatting.
23+
> - After creating a calendar view, if more columns are required, go to the [List Settings page](https://support.microsoft.com/office/edit-list-settings-4d35793b-246e-42a3-990c-563a83795b7f) to create and add them to a calendar view.
2424
2525
### Conditional view formatting based on a specific column
2626

@@ -32,6 +32,7 @@ The following image shows an example of conditional formatting applied to a cale
3232
> Before creating a new calendar view, make sure the PROJECT column is already existing to apply the JSON code illustrated below. Alternatively, go the [List Settings page](https://support.microsoft.com/office/edit-list-settings-4d35793b-246e-42a3-990c-563a83795b7f) to create and add the single choice PROJECT column to a calendar view.
3333
3434
In this example, **PROJECT** column has the following options:
35+
3536
- Project A
3637
- Project B
3738
- Project C
@@ -46,7 +47,6 @@ The JSON code below makes use of SharePoint Online Modern UI classes to apply co
4647
"additionalEventClass": "=if([$PROJECT] =='Project A' && @isSelected == false, 'sp-css-backgroundColor-successBackground50 sp-css-color-BlackText sp-css-borderColor-GreenText ms-bgColor-sharedGreenCyan10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project A' && @isSelected == true, 'ms-bgColor-green sp-css-color-WhiteText', if([$PROJECT] =='Project B' && @isSelected == false, 'sp-css-backgroundColor-BgPeach sp-css-color-BlackText sp-css-borderColor-RedText ms-bgColor-sharedRed10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project B' && @isSelected == true, 'sp-css-backgroundColor-redDark sp-css-color-WhiteText', if([$PROJECT] =='Project C' && @isSelected == false, 'sp-css-backgroundColor-BgGold sp-css-color-BlackText sp-css-borderColor-BrownText ms-bgColor-yellow--hover ms-fontColor-white--hover', if([$PROJECT] =='Project C' && @isSelected == true, 'ms-bgColor-sharedOrange10 sp-css-color-BlackText', if([$PROJECT] =='Project D' && @isSelected == false, 'ms-bgColor-communicationTint20 sp-css-color-BlackText sp-css-borderColor-BlueText ms-bgColor-sharedCyanBlue10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project D' && @isSelected == true, 'sp-css-backgroundColor-BlueText sp-css-color-WhiteText', if([$PROJECT] =='Project E' && @isSelected == false, 'sp-css-backgroundColor-BgLilac sp-css-color-BlackText sp-css-borderColor-DarkPurpleText ms-bgColor-sharedBlueMagenta20--hover ms-fontColor-white--hover', if([$PROJECT] =='Project E' && @isSelected == true, 'sp-css-backgroundColor-BgPurple sp-css-color-WhiteText', if(@isSelected == false, 'sp-css-backgroundColor-neutralBackground20 sp-css-color-BlackText ms-bgColor-neutralTertiaryAlt--hover ms-fontColor-black--hover', 'sp-css-backgroundColor-neutralTertiary sp-css-color-WhiteText')))))))))))"
4748
}
4849
```
49-
<br>
5050

5151
The gif image below shows the final result:
5252

0 commit comments

Comments
 (0)