default editor to today

This commit is contained in:
2026-02-17 11:58:22 +13:00
parent 2a953ef5ce
commit 4413374429

View File

@@ -1,13 +1,11 @@
<script lang="ts">
import { CalendarDate } from "@internationalized/date";
import { CalendarDate, today, getLocalTimeZone } from "@internationalized/date";
import { onMount } from "svelte";
import { formatDate } from "$lib/date";
import { createEntry, updateEntry, deleteEntry } from "$lib/upload.ts";
let {
dateValue = $bindable<CalendarDate | undefined>(
new CalendarDate(2026, 2, 1),
),
dateValue = $bindable<CalendarDate>( today(getLocalTimeZone()) ),
} = $props();
let edit = $state<boolean>(false);
@@ -55,3 +53,4 @@
</button>
{/if}
</div>