{ "_comment": "Highlight a date field according to whether or not the date has passed", "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "inlineEditField": "@currentField", "style": { "background-color": "=if(getYear(@now)==getYear(@currentField) && getMonth(@now)==getMonth(@currentField) && getDate(@now)==getDate(@currentField),'LightYellow',if(@currentField < @now,'LavenderBlush','') + if(@currentField > @now,'Lime',''))", "color": "=if(getYear(@now)==getYear(@currentField) && getMonth(@now)==getMonth(@currentField) && getDate(@now)==getDate(@currentField),'Black',if(@currentField < @now,'Black','') + if(@currentField > @now,'Black',''))", "font-size": "14px", "font-family": "inherit", "border": "1px solid Black", "border-radius": "=if(1==1,'10px','0px')", "--inline-editor-border-color": "Red", "cursor": "=if(1==1,'pointer','auto')" }, "children": [ { "elmType": "div", "txtContent": "@currentField", "style": { "margin": "auto" } } ] }