1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-15 00:00:15 +00:00

fix: add back month and year selection for date picker

This commit is contained in:
Elias Schneider
2025-05-23 11:56:08 +02:00
parent 869c4c5871
commit 6c35570e78
4 changed files with 110 additions and 39 deletions

View File

@@ -68,18 +68,23 @@
<div class="w-full" {...restProps}>
<Popover.Root bind:open>
<Popover.Trigger class="w-full">
<Button
{id}
variant="outline"
class={cn('w-full justify-start text-left font-normal', !value && 'text-muted-foreground')}
aria-label={m.select_a_date()}
>
<CalendarIcon class="mr-2 size-4" />
{calendarDisplayDate
? df.format(calendarDisplayDate.toDate(getLocalTimeZone()))
: m.select_a_date()}
</Button>
<Popover.Trigger {id} class="w-full" >
{#snippet child({ props })}
<Button
{...props}
variant="outline"
class={cn(
'w-full justify-start text-left font-normal',
!value && 'text-muted-foreground'
)}
aria-label={m.select_a_date()}
>
<CalendarIcon class="mr-2 size-4" />
{calendarDisplayDate
? df.format(calendarDisplayDate.toDate(getLocalTimeZone()))
: m.select_a_date()}
</Button>
{/snippet}
</Popover.Trigger>
<Popover.Content class="w-auto p-0" align="start">
<Calendar