How to Automatically Highlight Microsoft Lists Rows by Due Date
Question details
The user wants to dynamically format and highlight entire rows in Microsoft Lists when a task's due date is today or has already passed.

- Product
- Microsoft Lists
- Device & OS
- not provided
- Scenario
- Tracking project deadlines or task due dates where overdue or urgent items need to stand out visually using list view formatting.
- Observed behavior
- Rows remain unformatted until custom JSON code is applied to the list's view settings to compare the date column to the current date.
Ensure your due date column is strictly set to the 'Date and Time' type. You must also know the exact internal name of this column (which may differ from its display name) for the formatting code to work.
Use JSON View Formatting to Highlight Rows
Apply a custom JSON schema to the list's view to dynamically change the background color of rows based on a date comparison.
Microsoft Lists utilizes JSON (JavaScript Object Notation) to customize how rows are displayed. By comparing your date column to the '@now' parameter, you can conditionally apply UI classes like 'ms-bgColor-amber' or 'ms-bgColor-red' to entire rows.
Navigate to your Microsoft List. In the top right corner of the command bar, click the View options dropdown menu (this usually displays your current view name, such as 'All Items').
Select 'Format current view' from the dropdown menu. In the formatting pane that appears on the right side of the screen, click 'Advanced mode' at the bottom to enable JSON code input.
Paste your JSON code into the editor. For example: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "additionalRowClass": "=if([$Due] <= @now, 'ms-bgColor-amber', '')" }. Be sure to replace 'Due' with the actual internal name of your date column.
Click 'Save' and check your list. Rows with a date of today or earlier should now be highlighted with an amber background.

Track Due Dates Easily Without Code in WPS Office
While Microsoft Lists requires complex JSON coding to highlight due dates, you can effortlessly manage trackers and task lists using intuitive Conditional Formatting in WPS Spreadsheet—no coding required.

Frequently Asked Questions
How do I find the internal name of a column in Microsoft Lists?
Go to the Settings gear icon > List settings. Scroll down to the Columns section and click on your date column. Look at the URL in your browser's address bar; the internal name is the text immediately following 'Field=' at the very end of the URL.
Why is my JSON code highlighting every row instead of just the overdue ones?
This usually happens if the column referenced in the JSON is not formatted as a 'Date and Time' column, or if the internal name is typed incorrectly. Verify the exact internal name and ensure the column type is correct in your List settings.
Can I use different colors for different due date conditions?
Yes. You can nest 'if' statements within the 'additionalRowClass' property to apply different Microsoft UI Fabric color classes (like 'ms-bgColor-red' for overdue and 'ms-bgColor-yellow' for due today) based on multiple date comparisons.




