diff --git a/src/store.js b/src/store.js index 24cb871..8b2b6db 100644 --- a/src/store.js +++ b/src/store.js @@ -26,6 +26,11 @@ watch(language, (newValue) => { export const selectedDate = ref(new Date(new Date().setUTCHours(0, 0, 0, 0))); export const selectedDay = computed(() => selectedDate.value.getDay() - 1); +// Jump to next Monday if it is weekend +if (selectedDay.value == 5) + selectedDate.value = new Date(selectedDate.value.getTime() + 86400000 * 2); +if (selectedDay.value == -1) + selectedDate.value = new Date(selectedDate.value.getTime() + 86400000); export const timetable = ref({ trusted: true }); export const substitutions = ref([]);