mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-11 11:49:19 +00:00
fix(translations): add missing translations to date picker
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as Calendar from '$lib/components/ui/calendar/index.js';
|
import * as Calendar from '$lib/components/ui/calendar/index.js';
|
||||||
import * as Select from '$lib/components/ui/select/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 { cn } from '$lib/utils/style';
|
||||||
import { CalendarDate, DateFormatter, getLocalTimeZone, today } from '@internationalized/date';
|
import { CalendarDate, DateFormatter, getLocalTimeZone, today } from '@internationalized/date';
|
||||||
import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
|
import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
|
||||||
@@ -12,9 +13,10 @@
|
|||||||
value: CalendarDate | undefined;
|
value: CalendarDate | undefined;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
|
const locale = getLocale();
|
||||||
const currentDate = today(getLocalTimeZone());
|
const currentDate = today(getLocalTimeZone());
|
||||||
|
|
||||||
const monthFmt = new DateFormatter('en-US', {
|
const monthFmt = new DateFormatter(locale, {
|
||||||
month: 'long'
|
month: 'long'
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -53,6 +55,7 @@
|
|||||||
type="single"
|
type="single"
|
||||||
weekdayFormat="short"
|
weekdayFormat="short"
|
||||||
class={cn('rounded-md border p-3')}
|
class={cn('rounded-md border p-3')}
|
||||||
|
{locale}
|
||||||
bind:value
|
bind:value
|
||||||
bind:placeholder
|
bind:placeholder
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user