Skip to main content
14 events
when toggle format what by license comment
May 11, 2023 at 11:55 history edited Ganesh Sanap - MVP CC BY-SA 4.0
added 241 characters in body
Mar 13, 2019 at 17:47 comment added Ganesh Sanap - MVP Maybe... By traversing all the child elements inside row and changing their color properties.
Mar 13, 2019 at 17:17 comment added mdevm So is there no way to highlight text color. I understand the complexity you mentioned but just wanted to know if that's possible by somehow thanks.
Mar 13, 2019 at 17:15 vote accept mdevm
Mar 13, 2019 at 17:07 comment added Ganesh Sanap - MVP I have updated the answer. Please upvote and accept. And about changing color, it is bit difficult task as the rows contains td, td contains nested divs, spans, anchor tags and so on. And these elements inherits color properties from SharePoint default CSS.
Mar 13, 2019 at 17:03 history edited Ganesh Sanap - MVP CC BY-SA 4.0
added 148 characters in body
Mar 13, 2019 at 16:38 comment added mdevm Great thanks Ganesh, the sethours logic works. Can you update your answer so i can mark it as complete. Also one question, In addition to the background color, I also want to change the color of text from black to yellow or so. I tried row.style.color= 'green'; but that did not work, any thoughts?
Mar 13, 2019 at 16:13 comment added Ganesh Sanap - MVP You should be getting line number where an error is. Also as I mentioned in first comment, you can use itemdate <= today(23:59:59) and itemdate >=today(0,0,0,).
Mar 13, 2019 at 15:16 comment added mdevm One thing I am noticing is, the same script works for conditions: item date<=today or item date >= today but when it comes to equal to it does not work. So item date===today, item date==today or item date = today does not work it seems. thoughts?
Mar 13, 2019 at 15:10 comment added mdevm Upon running the script on console, i see following message: Uncaught SyntaxError: Unexpected token <. However I don't see any additional '<' being used in the script.
Mar 13, 2019 at 14:59 comment added Ganesh Sanap - MVP Are you getting any error in console? Or wrong rows get colored? Or nothing happens at all?
Mar 13, 2019 at 14:35 comment added mdevm I updated the script in the question info, still no luck with it.
Mar 13, 2019 at 14:15 comment added Ganesh Sanap - MVP You can also build the logic something like, itemDate < today.setHours(23,59,59) && itemDate > today.setHours(0,0,0) . And if you want to use json formatting and modern experience then check my answer given here.
Mar 13, 2019 at 14:12 history answered Ganesh Sanap - MVP CC BY-SA 4.0