mirror of
https://github.com/jakobkordez/ham-reserve.git
synced 2025-05-30 15:40:28 +00:00
Minor fixes
This commit is contained in:
parent
85d3bd4f50
commit
085f583ddd
@ -70,8 +70,7 @@
|
||||
onclick={() => {
|
||||
let d = new Date(date);
|
||||
d.setDate(d.getDate() - 1);
|
||||
clampDate(d, event);
|
||||
date = d.toISOString().slice(0, 10);
|
||||
date = clampDate(d, event).toISOString().slice(0, 10);
|
||||
}}
|
||||
>
|
||||
<Fa icon={faChevronLeft} />
|
||||
@ -81,8 +80,7 @@
|
||||
onclick={() => {
|
||||
let d = new Date(date);
|
||||
d.setDate(d.getDate() + 1);
|
||||
clampDate(d, event);
|
||||
date = d.toISOString().slice(0, 10);
|
||||
date = clampDate(d, event).toISOString().slice(0, 10);
|
||||
}}
|
||||
>
|
||||
<Fa icon={faChevronRight} />
|
||||
|
@ -11,6 +11,7 @@
|
||||
import ModeSelector from './mode-selector.svelte';
|
||||
import { invalidateAll } from '$app/navigation';
|
||||
import { getAccessToken } from '$lib/stores/auth-store';
|
||||
import { clampDate } from '..';
|
||||
|
||||
function floorHour(date: number) {
|
||||
return new Date(Math.floor(date / hourInMs) * hourInMs);
|
||||
@ -36,8 +37,8 @@
|
||||
let availableBands = $state<Set<Band>>(new Set(COMMON_BANDS));
|
||||
let availableModes = $state<Set<Mode>>(new Set(COMMON_MODES));
|
||||
|
||||
let startDT = $state<Date>(floorHour(Date.now()));
|
||||
let endDT = $state<Date>(floorHour(Date.now() + hourInMs));
|
||||
let startDT = $state<Date>(clampDate(floorHour(Date.now()), event));
|
||||
let endDT = $state<Date>(clampDate(floorHour(Date.now() + hourInMs), event));
|
||||
let bands = $state<Set<Band>>(new Set());
|
||||
let modes = $state<Set<Mode>>(new Set());
|
||||
let error = $state<string[]>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user