Skip to content

Commit

Permalink
Calendar: Dual view: [Today] button should also change month view to …
Browse files Browse the repository at this point in the history
…today
  • Loading branch information
benbucksch committed Dec 10, 2024
1 parent b69a0e0 commit 2f7b000
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/frontend/Calendar/DualView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
export let events: Collection<Event>;
let monthStart: Date;
$: start, syncMonth();
function syncMonth() {
monthStart = start;
}
</script>

<style>
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/Util/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function getToday() {
return today;
}

/** @returns Mon-Sun */
/** @returns Mon-Sun around `start` */
export function getWeekDays(start: Date): Date[] {
let startTime = new Date(start);
// Always start with Monday
Expand Down

0 comments on commit 2f7b000

Please sign in to comment.