diff --git a/contact-form.js b/contact-form.js index 5232b1c..5eb6843 100644 --- a/contact-form.js +++ b/contact-form.js @@ -10,8 +10,15 @@ const submitBtn = document.getElementById('submitBtn'); const textarea = form.querySelector('textarea[name="message"]'); const phoneInput = form.querySelector('input[name="phone"]'); + const dateInput = form.querySelector('input[name="eventDate"]'); let selectedFiles = []; + // Forbid past dates (today is allowed) + if (dateInput) { + const t = new Date(); + dateInput.min = `${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,'0')}-${String(t.getDate()).padStart(2,'0')}`; + } + // Textarea auto-resize textarea.style.overflow = 'hidden'; textarea.addEventListener('input', function () {