small fixes for tools

This commit is contained in:
vcoppe
2025-10-24 20:07:15 +02:00
parent 9c83dcafa7
commit 6db8696a36
8 changed files with 241 additions and 196 deletions

View File

@@ -12,12 +12,14 @@
disabled = false,
locale,
class: className = '',
onchange = () => {},
}: {
value?: DateValue;
placeholder?: string;
disabled?: boolean;
locale: string;
class?: string;
onchange?: (date: DateValue | undefined) => void;
} = $props();
const df = new DateFormatter(locale, {
@@ -43,6 +45,6 @@
{value ? df.format(value.toDate(getLocalTimeZone())) : placeholder}
</Popover.Trigger>
<Popover.Content bind:ref={contentRef} class="w-auto p-0">
<Calendar type="single" captionLayout="dropdown" bind:value />
<Calendar type="single" captionLayout="dropdown" bind:value onValueChange={onchange} />
</Popover.Content>
</Popover.Root>