diff --git a/src/App.svelte b/src/App.svelte index dd88bb7..f16fa35 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -37,6 +37,7 @@ })(); const params = new URL(document.location).searchParams.getAll('c'); + const date = new Date(new URL(document.location).searchParams.get('d')); const headers = mobile ? { @@ -54,6 +55,7 @@ let options = writable({ initialView: mobile ? 'listWeek' : 'timeGridWeek', + initialDate: date.toString() === 'Invalid Date' ? now : date, plugins: [ timeGridPlugin, dayGridPlugin, @@ -67,7 +69,7 @@ allDayContent: '', headerToolbar: headers, buttonText: { resourceTimelineDay: 'Salles' }, - scrollTime: "08:00:00", + scrollTime: '08:00:00', resourceGroupField: 'building', resourceAreaWidth: '27%', resources: Object.entries(ENSLocations).flatMap(([building, rooms]) =>