Correct the date parsing on Safari based browsers, while changing the month in the booking page

This commit is contained in:
Alex Tselegidis 2023-07-24 09:48:27 +02:00
parent afdc1b839a
commit 0fdb1ffdae

View file

@ -93,7 +93,7 @@ App.Pages.Booking = (function () {
onMonthChange: (selectedDates, dateStr, instance) => {
setTimeout(() => {
const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + (Number(instance.monthsDropdownContainer.value) + 1) + '-01');
const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + String(Number(instance.monthsDropdownContainer.value) + 1).padStart(2, '0') + '-01');
App.Http.Booking.getUnavailableDates(
$selectProvider.val(),