default editor to today
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user