Yusuf Posted January 17, 2020 Report Share Posted January 17, 2020 Hi, I am having an issue with working with the date field. What I am trying to do is: I want to change the background color of the rows (records) on a data page if a date from that record is older than the current date (Timestamp). Please see my source code from the HTML block below. It seems working if the date and the current date is from the same year. However, it is not working if the dates (record date and current date) are from two different years. How can I solve this issue? ........ [@field:files_File_Number] <a id="visi[@field:actions_Action_ID]"> <script> var isi = document.getElementById("visi[@field:actions_Action_ID]"); if('[@field:actions_Reminder_Date]'<'[@cbTimestamp]'){ isi.parentNode.parentNode.style.backgroundColor = '#fcd4d4'; } else{ isi.parentNode.parentNode.style.backgroundColor = '#NoColor'; } </script></a> ........ Quote Link to comment Share on other sites More sharing options...
cheonsa Posted January 19, 2020 Report Share Posted January 19, 2020 Hi @Yusuf, I suggest that you review this forum post: I tried this solution on my end and it works! Yusuf 1 Quote Link to comment Share on other sites More sharing options...
Yusuf Posted January 22, 2020 Author Report Share Posted January 22, 2020 Thanks @LittleMsGinger . It worked! Quote Link to comment Share on other sites More sharing options...
Kurumi Posted January 12, 2022 Report Share Posted January 12, 2022 This new post might help as well: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.