Add initial date selection via querystring
This commit is contained in:
parent
bc634a8c35
commit
8279d15c04
1 changed files with 3 additions and 1 deletions
|
@ -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]) =>
|
||||
|
|
Loading…
Reference in a new issue