Verfügbarkeitsanfrage: Bis-Datum folgt automatisch dem Von-Datum

This commit is contained in:
torsten 2026-11-19 16:35:47 +01:00
parent 8967f7a50f
commit 30499392c4
2 changed files with 8 additions and 5 deletions

View file

@ -92,7 +92,7 @@ function url(string $path = '/'): string
}
/** Cache-Buster: bei Änderungen an app.css/app.js erhöhen. */
const DIC_ASSET_VERSION = '16';
const DIC_ASSET_VERSION = '17';
function asset(string $path): string
{

View file

@ -523,13 +523,16 @@
if (!/^\d{4}-\d{2}-\d{2}$/.test(value || '')) return;
// Der Datepicker von "Bis" startet damit im Monat des Folgetags.
end.min = value;
if (!end.value || end.value < value) {
end.value = nextDay(value);
}
// "Von" vorgeben heißt: eintägige Anfrage – "Bis" folgt automatisch.
end.value = nextDay(value);
};
// Beim Laden nur die Untergrenze setzen, damit eine vorhandene
// serverseitige Auswahl (GET-Parameter) erhalten bleibt.
if (/^\d{4}-\d{2}-\d{2}$/.test(start.value || '')) {
end.min = start.value;
}
start.addEventListener('input', sync);
start.addEventListener('change', sync);
sync();
});
/* -------------------------------------------------------- Kalender: Ziehen */