From 148b5df302ba33036ba4895c741ed364c3e21076 Mon Sep 17 00:00:00 2001 From: jeroenvds Date: Mon, 23 May 2022 17:56:11 +0200 Subject: [PATCH] Fix unavailability in calendar while booking Use moment set date for setting the day of the month. Day is used for day of the week. --- 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 7aa99b37..426c9fd8 100755 --- a/assets/js/http/booking_http_client.js +++ b/assets/js/http/booking_http_client.js @@ -295,7 +295,7 @@ App.Http.Booking = (function () { // Grey out unavailability dates. $('#select-date .ui-datepicker-calendar td:not(.ui-datepicker-other-month)').each((index, td) => { - selectedDateMoment.set({day: index + 1}); + selectedDateMoment.set({date: index + 1}); if (unavailabilityDates.indexOf(selectedDateMoment.format('YYYY-MM-DD')) !== -1) { $(td).addClass('ui-datepicker-unselectable ui-state-disabled'); }