We would like to highlight the due date in red once the date has passed.
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>
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.