date

7 Restaurants For A Romantic Dinner In Montreal

In a city like Montreal, you can feel the love and gastronomy in the air. [...]

document.addEventListener("DOMContentLoaded", function() { const calendarContainer = document.getElementById('hostaway-calendar-widget'); // تحقق من وجود زر الإغلاق أو إنشائه إذا لم يكن موجودًا let closeButton = document.getElementById('close-calendar'); if (!closeButton) { closeButton = document.createElement('button'); closeButton.id = 'close-calendar'; closeButton.textContent = 'Close'; closeButton.style.cssText = 'display: none'; document.body.appendChild(closeButton); } function toggleCalendar(displayStatus) { calendarContainer.style.display = displayStatus; closeButton.style.display = displayStatus; } closeButton.addEventListener('click', function() { toggleCalendar('none'); }); document.addEventListener('keydown', function(event) { if (event.key === 'Escape') { toggleCalendar('none'); } }); document.querySelectorAll('.show-calendar').forEach(button => { button.addEventListener('click', function() { const listingId = this.dataset.listingId; const actionType = this.textContent === 'Book Now1' ? 'inquiry' : 'checkout'; // تحديد الإجراء if (listingId && typeof window.hostawayCalendarWidget === 'function') { toggleCalendar('flex'); // عرض التقويم window.hostawayCalendarWidget({ baseUrl: 'https://booking.corporatestays.com/', listingId: listingId, numberOfMonths: 2, openInNewTab: false, font: 'Raleway, sans-serif', rounded: true, button: { action: actionType, // الإجراء: checkout أو inquiry text: actionType === 'inquiry' ? 'Send Inquiry' : 'Book now', }, clearButtonText: 'Clear dates', color: { mainColor: '#DE3986', frameColor: '#DE3986', textColor: '#DE3986', }, }); } else { console.error('Required data or functions are missing.'); } }); }); // اختياري: إغلاق التقويم عند النقر خارج الحاوية document.addEventListener('click', function(event) { if (!calendarContainer.contains(event.target) && closeButton.style.display === 'block') { toggleCalendar('none'); } }); });
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.