diff --git a/web/static/scripts/home.js b/web/static/scripts/home.js new file mode 100644 index 0000000..50a2f12 --- /dev/null +++ b/web/static/scripts/home.js @@ -0,0 +1,13 @@ + +function openReservationForm() { + const now = new Date(); + const minDate = new Date(); + minDate.setDate(now.getDate() + 3); // Exclude today and the next 2 days + const formattedMinDate = minDate.toISOString().split('T')[0]; + document.getElementById('datum_konce').setAttribute('min', formattedMinDate); + document.getElementById('reservationForm').style.display = 'block'; +} + +function closeReservationForm() { + document.getElementById('reservationForm').style.display = 'none'; +} \ No newline at end of file diff --git a/web/templates/home.html b/web/templates/home.html index 10ff296..c2faeec 100644 --- a/web/templates/home.html +++ b/web/templates/home.html @@ -150,20 +150,6 @@ - - +