0

I'm having trouble colour coding a calendar view for my 'events' list in SharePoint.

I was able to colour code a standard SharePoint list's calendar view without issue (see below) but for some reason it's not working when trying to recreate the same list and view for my 'events' content type list.

enter image description here

As shown below, I'm not even able to set a global style for all items, let alone coding by my category column.

enter image description here

I did a search on Google and on here but I didn't see any forums that had this issue. Any help or insight would be appreciated!

4
  • 1
    Are you creating a list with classic "Calendar" list template & showing it in modern experience OR are you creating a blank/custom list and adding "Event" content type in the list? Commented Jan 19 at 16:50
  • Could you please provide more information in this thread, for example, the JSON code you are trying to color the list?
    – Allen_MSFT
    Commented Jan 22 at 7:17
  • This is so frustrating I have the same problem.
    – Michelle
    Commented Jun 16 at 7:19
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review Commented Jun 17 at 3:47

1 Answer 1

0

enter image description here

I have this same problem. I created a List in SP and displayed it as a calendar with conditional formatting, no problem. But then I found out you can only connect classic Event Lists to Outlook so I recreated the calendar as an Events List using New View, and now conditional formatting rules don't change anything. Also, notice how the Title field is shown twice in the drop down for Conditional Formatting (I've tried rules with both, it makes no difference).

JSON code is as follows:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "additionalEventClass": {
    "operator": ":",
    "operands": [
      {
        "operator": "==",
        "operands": [
          "[$Title]",
          "IRQR Time Slot"
        ]
      },
      "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgGreen' , 'sp-css-backgroundColor-BgMintGreen sp-css-color-MintGreenFont')",
      ""
    ]
  }
}
1

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.