From 8ef591279d91f7daa0d84f814d240e3a3cca9131 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 2 May 2022 13:46:55 -0600 Subject: [PATCH] - Don't highlight birthdays in date picker (calendar & regular) though tooltip remains - Un-highlight weeks when mouse moves off week number --- api/templates/default/etemplate2.css | 3 ++- calendar/js/SidemenuDate.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index b42ae904b7..cc79d4a1c4 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -4022,7 +4022,8 @@ body .flatpickr-calendar { } /** Holidays & birthdays **/ -div.flatpickr-calendar .calHoliday, div.flatpickr-calendar .calBirthday { +div.flatpickr-calendar .calHoliday /*, div.flatpickr-calendar .calBirthday*/ +{ background-color: rgba(103, 159, 210, 0.5); } diff --git a/calendar/js/SidemenuDate.ts b/calendar/js/SidemenuDate.ts index d114247a23..c6db86be28 100644 --- a/calendar/js/SidemenuDate.ts +++ b/calendar/js/SidemenuDate.ts @@ -42,6 +42,7 @@ export class SidemenuDate extends Et2Date this._onDayCreate = this._onDayCreate.bind(this); this._handleChange = this._handleChange.bind(this); this._handleDayHover = this._handleDayHover.bind(this); + this._clearHover = this._clearHover.bind(this); this._updateGoButton = this._updateGoButton.bind(this); } @@ -61,6 +62,7 @@ export class SidemenuDate extends Et2Date if(this._instance.daysContainer !== undefined) { this._instance.weekNumbers.removeEventListener("mouseover", this._handleDayHover); + this._instance.weekNumbers.removeEventListener("mouseout", this._clearHover); } } @@ -79,6 +81,7 @@ export class SidemenuDate extends Et2Date if(this._instance.daysContainer !== undefined) { this._instance.weekNumbers.addEventListener("mouseover", this._handleDayHover); + this._instance.weekNumbers.addEventListener("mouseout", this._clearHover); } // Customise next / prev buttons