diff --git a/src/card.js b/src/card.js index e747011..48e9f48 100644 --- a/src/card.js +++ b/src/card.js @@ -175,6 +175,7 @@ export class WeekPlannerCard extends LitElement { this._hidePastEvents = config.hidePastEvents ?? false; this._hideDaysWithoutEvents = config.hideDaysWithoutEvents ?? false; this._hideTodayWithoutEvents = config.hideTodayWithoutEvents ?? false; + this._hideNoEventsText = config.hideNoEventsText ?? false; this._filter = config.filter ?? false; this._filterText = config.filterText ?? false; this._combineSimilarEvents = config.combineSimilarEvents ?? false; @@ -425,7 +426,7 @@ export class WeekPlannerCard extends LitElement { dayEvents.push(event); }); - if (dayEvents.length === 0) { + if (dayEvents.length === 0 && !this._hideNoEventsText) { return this._renderNoEvents(); } diff --git a/src/editor.js b/src/editor.js index 22cb228..eea43a0 100644 --- a/src/editor.js +++ b/src/editor.js @@ -112,6 +112,7 @@ export class WeekPlannerCardEditor extends LitElement { ${this.addBooleanField('hideWeekend', 'Hide weekend')} ${this.addBooleanField('hideDaysWithoutEvents', 'Hide days without events except for today')} ${this.addBooleanField('hideTodayWithoutEvents', 'Also hide today without events')} + ${this.addBooleanField('hideNoEventsText', 'Hide the no events text')} ${this.addTextField('maxDayEvents', 'Maximum number of events per day (0 is no maximum)', 'number', 0)} ` )}