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