Fix date handling in DateRangeCollapse and TransportationModal; improve hash change handling in +page.svelte

This commit is contained in:
Sean Morley
2025-05-10 22:03:31 -04:00
parent abc2d86dcf
commit d9d754a87c
3 changed files with 18 additions and 8 deletions

View File

@@ -300,7 +300,7 @@
function handleHashChange() {
const hash = window.location.hash.replace('#', '');
if (hash) {
currentView = hash
currentView = hash;
} else if (!collection.start_date) {
currentView = 'all';
} else {
@@ -308,7 +308,7 @@
}
}
function changeHash(event) {
function changeHash(event: any) {
window.location.hash = '#' + event.target.value;
}
@@ -776,7 +776,8 @@
{/if}
{#if collection.id}
<select class="select select-bordered border-primary md:hidden w-full"
<select
class="select select-bordered border-primary md:hidden w-full"
value={currentView}
on:change={changeHash}
>