Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a configurable way to change the colour of the DUE DATE, once the date has passed ?

Sandy Rogers November 7, 2011

We would like to highlight the due date in red once the date has passed.

1 answer

0 votes
Sergey Papurin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2012

Via Velocity processed Message Custom Field (for view),

customfield_10000-val - to hide the name of your field:


<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#customfield_10000-val').parent().hide();
var content = jQuery("#due-date").html();
var fullDate = new Date();
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) : '0' + (fullDate.getMonth()+1);
var currentDate = fullDate.getFullYear() + "-" + twoDigitMonth + "-" + fullDate.getDate();
if (new Date(content) <= new Date(currentDate))
{
jQuery("#due-date").css('background-color', 'red');
}
});
</script>


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events