Skip to content

EspoCRM – Open Source CRM Application

empty working range

Yuri Kuznetsov0e7c4058627f
diff --git a/application/Espo/Modules/Crm/Tools/Calendar/Service.php b/application/Espo/Modules/Crm/Tools/Calendar/Service.php
index fe7ac47d6f..6c2b2707c8 100644
--- a/application/Espo/Modules/Crm/Tools/Calendar/Service.php
+++ b/application/Espo/Modules/Crm/Tools/Calendar/Service.php
@@ -135,6 +135,17 @@ class Service
$workingRangeItemList = $workingCalendar->isAvailable() ?
$this->getWorkingRangeList($workingCalendar, $fetchParams) : [];
+
+ if (
+ $workingCalendar->isAvailable() &&
+ !$fetchParams->workingTimeRangesInverted() &&
+ $workingRangeItemList === []
+ ) {
+ // Empty range for fullcalendar. The whole range is non-working.
+ $workingRangeItemList = [
+ new WorkingRange($fetchParams->getFrom(), $fetchParams->getFrom())
+ ];
+ }
}
$queryList = [];