diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index ea083774..6d2380b1 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -253,7 +253,7 @@ function angeltype_controller_shiftsFilter($angeltype, $days) [$angeltype['id']] ); $selected_day = date('Y-m-d'); - if (!empty($days)) { + if (!empty($days) && !in_array($selected_day, $days)) { $selected_day = $days[0]; } if ($request->has('shifts_filter_day')) { diff --git a/includes/controller/rooms_controller.php b/includes/controller/rooms_controller.php index 539d5d67..b9f299d4 100644 --- a/includes/controller/rooms_controller.php +++ b/includes/controller/rooms_controller.php @@ -37,7 +37,7 @@ function room_controller(): array AngelType_ids() ); $selected_day = date('Y-m-d'); - if (!empty($days)) { + if (!empty($days) && !in_array($selected_day, $days)) { $selected_day = $days[0]; } if ($request->has('shifts_filter_day')) {