Smart Video Conference Scheduler

Smart Video Conference Scheduler

Find the perfect meeting time across different time zones, effortlessly.

Step 1: Select Participants

Step 2: Set Meeting Details

Step 3: Choose the Best Time

Suggested meeting times will appear here.

Manage Participants

Name Time Zone Actions

No common availability found for the selected participants and duration.

`; downloadPdfBtn.disabled = true; return; } const userTz = Intl.DateTimeFormat().resolvedOptions().timeZone; let html = `

Top 5 Suggested Times (in your local time: ${userTz})

`; html += slots.slice(0, 5).map(slot => { const localTimeStr = slot.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', timeZone: userTz }); const participantTimes = selectedPs.map(p => { const pTime = slot.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit', timeZone: p.tz }); return `${p.name.split(' ')[0]}: ${pTime}`; }).join(' '); return `

${localTimeStr}

${participantTimes}
`; }).join(''); resultsContainer.innerHTML = html; downloadPdfBtn.disabled = false; } // --- EVENT HANDLERS --- function handleAddParticipant(e) { e.preventDefault(); const name = document.getElementById('participant-name').value; const tz = participantTzSelect.value; if (name && tz) { participants.push({ id: Date.now(), name, tz }); addParticipantForm.reset(); renderAll(); } } function handleDeleteParticipant(e) { if (e.target.classList.contains('delete-participant-btn')) { const pId = parseInt(e.target.dataset.id); participants = participants.filter(p => p.id !== pId); renderAll(); } } function generatePdf() { const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('pdf-content'); const pdfTitleEl = document.getElementById('pdf-title'); if (!pdfContent || downloadPdfBtn.disabled) return; const date = new Date(meetingDateInput.value + 'T00:00:00'); pdfTitleEl.textContent = `Meeting Options for ${date.toLocaleDateString('en-US', { dateStyle: 'long' })}`; html2canvas(pdfContent, { scale: 2, useCORS: true, logging: false }) .then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const ratio = canvas.width / canvas.height; const imgHeight = (pdfWidth - 20) / ratio; pdf.addImage(imgData, 'PNG', 10, 10, pdfWidth - 20, imgHeight); pdf.save(`Meeting-Options-${meetingDateInput.value}.pdf`); pdfTitleEl.textContent = ''; }); } // --- EVENT LISTENERS --- function addEventListeners() { tabButtons.forEach(button => { button.addEventListener('click', () => { const tab = button.dataset.tab; tabButtons.forEach(btn => btn.classList.toggle('active', btn.dataset.tab === tab)); tabContents.forEach(content => content.classList.toggle('active', content.id.startsWith(tab))); }); }); addParticipantForm.addEventListener('submit', handleAddParticipant); participantListBody.addEventListener('click', handleDeleteParticipant); findTimesBtn.addEventListener('click', findAvailableTimes); downloadPdfBtn.addEventListener('click', generatePdf); } initialize(); });
Scroll to Top