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

fix(translations): add missing translations to date picker

This commit is contained in:
Elias Schneider
2026-01-02 15:57:50 +01:00
parent d9e7bf9eef
commit 894eaf3cff

View File

@@ -1,6 +1,7 @@
<script lang="ts">
import * as Calendar from '$lib/components/ui/calendar/index.js';
import * as Select from '$lib/components/ui/select/index.js';
import { getLocale } from '$lib/paraglide/runtime';
import { cn } from '$lib/utils/style';
import { CalendarDate, DateFormatter, getLocalTimeZone, today } from '@internationalized/date';
import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
@@ -12,9 +13,10 @@
value: CalendarDate | undefined;
} = $props();
const locale = getLocale();
const currentDate = today(getLocalTimeZone());
const monthFmt = new DateFormatter('en-US', {
const monthFmt = new DateFormatter(locale, {
month: 'long'
});
@@ -53,6 +55,7 @@
type="single"
weekdayFormat="short"
class={cn('rounded-md border p-3')}
{locale}
bind:value
bind:placeholder
>