Skip to content

Commit

Permalink
Correct the date parsing on Safari based browsers, while changing the…
Browse files Browse the repository at this point in the history
… month in the booking page
  • Loading branch information
alextselegidis committed Jul 24, 2023
1 parent afdc1b8 commit 0fdb1ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/pages/booking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0fdb1ff

Please sign in to comment.