From 7b42d8a339cfa0ffa53f21dc8d4469ebeb4a6659 Mon Sep 17 00:00:00 2001 From: Marcel Link Date: Wed, 31 Jul 2024 11:33:55 +0200 Subject: [PATCH] fix loop when going a month back --- assets/js/http/booking_http_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/http/booking_http_client.js b/assets/js/http/booking_http_client.js index 61fd1a1b..d2ed9d0d 100755 --- a/assets/js/http/booking_http_client.js +++ b/assets/js/http/booking_http_client.js @@ -284,7 +284,7 @@ App.Http.Booking = (function () { while (startOfMonthMoment.isSameOrBefore(endOfMonthMoment)) { unavailableDates.push(startOfMonthMoment.format('YYYY-MM-DD')); - startOfMonthMoment.add(monthChangeStep, 'days'); // Move to the next day + startOfMonthMoment.add(Math.abs(monthChangeStep), 'days'); // Move to the next day } applyUnavailableDates(unavailableDates, searchedMonthStart, true);