Highlight row based on duedate (task)

edited June 20, 2019 in Questions
Trying to make a table row background color red when the duedate < today.

The below snippet/CSS combo was working for about 5 minutes but has not worked since. I am not very familiar with JS, so I am having trouble resolving. What am I missing?

Snippet:
var params = arguments[0],
$ = skuid.$;
var field = arguments[0],
value = skuid.time.parseSFDate(skuid.utils.decodeHTML(arguments[1]));
value.setHours(0,0,0,0);
var today = new Date();
today.setHours(0,0,0,0);

skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value); 
 
if (field.mode == 'read' && (value < today()))
    { 
        field.item.element.addClass("red-row");
 }

CSS:
table.nx-skootable-data tbody tr.red-row td {background-color: #E79A8E;} 

Comments

  • Luzie BaumgartLuzie Baumgart 🛠️ 
    edited June 20, 2019
    Hi Scott, could you please share which Skuid version you are using at the moment? :-)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!