













![20201017_141009[1].jpg](https://images.squarespace-cdn.com/content/v1/5f7cfcaa57ca754444f7e3ce/1602962768007-YDHELOGVFB68O3HZPSEY/20201017_141009%5B1%5D.jpg)
Booking Form
Select a date:
const previousMonthDays = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).getDate(); // Generate days for previous month for (let i = firstDayOfMonth - 1; i >= 0; i--) { const dayElement = document.createElement('div'); dayElement.classList.add('day'); dayElement.classList.add('disabled'); dayElement.innerHTML = previousMonthDays - i; calendarDays.appendChild(dayElement); } // Generate days for current month for (let i = 1; i <= daysInMonth; i++) { const dayElement = document.createElement('div'); dayElement.classList.add('day'); dayElement.innerHTML = i; calendarDays.appendChild(dayElement); } // Generate days for next month const remainingDays = 42 - calendarDays.children.length; for (let i = 1; i <= remainingDays; i++) { const dayElement = document.createElement('div'); dayElement.classList.add('day'); dayElement.classList.add('disabled'); dayElement.innerHTML = i; calendarDays.appendChild(dayElement); } // Update month and year header const monthHeader = document.querySelector('.month h2'); monthHeader.innerHTML = MONTHS[currentDate.getMonth()] + ' ' + currentDate.getFullYear(); // Add click event listeners to year buttons const prevYearButton = document.querySelector('.prev-year-button'); prevYearButton.addEventListener('click', () => { currentDate.setFullYear(currentDate.getFullYear() - 1); generateCalendar(); }); const nextYearButton = document.querySelector('.next-year-button'); nextYearButton.addEventListener('click', () => { currentDate.setFullYear(currentDate.getFullYear() + 1); generateCalendar(); }); } generateCalendar();
Select a date: