From 4aa8bbeef9619c2cbd43582b1640ee2c80f2228d Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 15 Aug 2022 08:45:21 -0600 Subject: [PATCH] Calendar: Fix weekend toggle hid more than just the weekend Bad date logic --- calendar/js/et2_widget_timegrid.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/js/et2_widget_timegrid.ts b/calendar/js/et2_widget_timegrid.ts index 88a0aa7ad1..f932f71247 100644 --- a/calendar/js/et2_widget_timegrid.ts +++ b/calendar/js/et2_widget_timegrid.ts @@ -1167,13 +1167,13 @@ export class et2_calendar_timegrid extends et2_calendar_view implements et2_IDet return day_list; } - let end = this.date_helper(end_date).getTime(); + let end = this.date_helper(end_date); let i = 1; let start = this.date_helper(start_date); do { - if(show_weekend || !show_weekend && [0, 6].indexOf(this.date_helper(end_date).getUTCDay()) === -1 || end_date === start_date) + if(show_weekend || !show_weekend && [0, 6].indexOf(start.getUTCDay()) === -1 || end_date === start_date) { day_list.push(formatDate(start, {dateFormat: "Ymd"})); }