Hello!
I am trying to add some conditional formatting to my SharePoint list and I know that I have to use javascript to go about this. What I am trying to do is read some dates in a date column I have and depending on how far out that date is from today's date it will change an items background color.
More information:
I have Hiring Date column with dates formatted as the following: 01/16, 02/15, 03/15, etc... and I have another column that has a requisition number. So for example if the date in the Hiring Date column is 90 days or less from today's date AND there requisition number is blank then that row will be yellow. If the Hiring date column is 30 days or less from today's date AND the requisition number is blank then that row will be orange. And finally if the hiring date is in the current month and there is no requisition number then the row will be red. So far a link that helped me to format the table color depends on words instead of a formula that was performed in the javascript function. http://techtrainingnotes.blogspot.com/2008/11/sharepoint-color-coding-sharepoint.ht Here is what I have so far: function CheckStatus() { Still not working for me. A few things I am unsure of how reference are my column name which is called "Month Needed" and then the current date format. In c# I would format the string to be the following "MM/YY" in javascript not sure if there is a way to check my dates against a formatted date. Any help on how to go about this would be great! Thank you |