fix loop when going a month back

This commit is contained in:
Marcel Link 2024-07-31 11:33:55 +02:00
parent 37374a254f
commit 7b42d8a339
No known key found for this signature in database

View file

@ -284,7 +284,7 @@ App.Http.Booking = (function () {
while (startOfMonthMoment.isSameOrBefore(endOfMonthMoment)) { while (startOfMonthMoment.isSameOrBefore(endOfMonthMoment)) {
unavailableDates.push(startOfMonthMoment.format('YYYY-MM-DD')); 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); applyUnavailableDates(unavailableDates, searchedMonthStart, true);