Skip to content

Commit

Permalink
Merge pull request #1577 from UPONU-GmbH/fix/bookingloop
Browse files Browse the repository at this point in the history
fix loop when going a month back in an edge case
  • Loading branch information
alextselegidis authored Jan 17, 2025
2 parents 0c59b43 + 7b42d8a commit 5b273df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/http/booking_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5b273df

Please sign in to comment.