mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-09 17:42:21 +03:00
fix loop when going a month back
This commit is contained in:
parent
37374a254f
commit
7b42d8a339
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue