File size: 967 Bytes
74eaa97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // Initialize date pickers and other global functionality
document.addEventListener('DOMContentLoaded', function() {
// Initialize date pickers
const departureDateInput = document.getElementById('departure-date');
const returnDateInput = document.getElementById('return-date');
if (departureDateInput) {
departureDateInput.valueAsDate = new Date();
// Set return date to 7 days after departure
const returnDate = new Date();
returnDate.setDate(returnDate.getDate() + 7);
returnDateInput.valueAsDate = returnDate;
}
// Mobile menu toggle functionality will be handled in the navbar component
});
// Flight search form submission
function handleFlightSearch(event) {
event.preventDefault();
// In a real app, this would submit to a backend or API
console.log('Searching for flights...');
alert('Search functionality would be implemented here in a real application.');
} |