From f742d11d451e0d56a0cbc60ac5335ab36bcfb986 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 5 Nov 2015 22:47:38 +0000 Subject: [PATCH] Calendar sidebox: - Apply today class to calendar (background is orange) --- calendar/js/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/calendar/js/app.js b/calendar/js/app.js index 4d851e4cf6..5df8cf8af3 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2646,12 +2646,18 @@ app.classes.calendar = AppJS.extend( // Mark holidays beforeShowDay: function (date) { + var tempDate = new Date(); + var today = new Date(tempDate.getFullYear(), tempDate.getUTCMonth(), tempDate.getUTCDate()); var holidays = et2_calendar_daycol.get_holidays({day_class_holiday: function() {}}, date.getFullYear()); var day_holidays = holidays[''+date.getUTCFullYear() + sprintf("%02d",date.getUTCMonth()+1) + sprintf("%02d",date.getUTCDate())]; var css_class = ''; var tooltip = ''; + if(date.getTime() == today.getTime()) + { + css_class += 'calendar_calToday '; + } if(typeof day_holidays !== 'undefined' && day_holidays.length) { for(var i = 0; i < day_holidays.length; i++)