fix(ui): unify date inputs — use DateInput component on both pages
Replace native <input type="date"> on the document search page with the custom DateInput component (German dd.mm.yyyy format with auto-dot insertion). Align both pages' date input styling: add rounded-md, border, bg-surface, px-3, text-ink, placeholder color, and focus ring to match all other inputs in the card. Refs: #179 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import PersonTypeahead from '$lib/components/PersonTypeahead.svelte';
|
import PersonTypeahead from '$lib/components/PersonTypeahead.svelte';
|
||||||
import TagInput from '$lib/components/TagInput.svelte';
|
import TagInput from '$lib/components/TagInput.svelte';
|
||||||
|
import DateInput from '$lib/components/DateInput.svelte';
|
||||||
import SortDropdown from '$lib/components/SortDropdown.svelte';
|
import SortDropdown from '$lib/components/SortDropdown.svelte';
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import { m } from '$lib/paraglide/messages.js';
|
import { m } from '$lib/paraglide/messages.js';
|
||||||
@@ -192,24 +193,22 @@ $effect(() => {
|
|||||||
class="mb-2 block text-xs font-bold tracking-widest text-ink-2 uppercase"
|
class="mb-2 block text-xs font-bold tracking-widest text-ink-2 uppercase"
|
||||||
>{m.docs_filter_label_from()}</label
|
>{m.docs_filter_label_from()}</label
|
||||||
>
|
>
|
||||||
<input
|
<DateInput
|
||||||
type="date"
|
|
||||||
id="from"
|
id="from"
|
||||||
bind:value={from}
|
bind:value={from}
|
||||||
onchange={onSearch}
|
onchange={onSearch}
|
||||||
class="block w-full border-line py-2.5 text-sm shadow-sm"
|
class="block w-full rounded-md border border-line bg-surface px-3 py-2.5 text-sm text-ink shadow-sm placeholder:text-ink-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="to" class="mb-2 block text-xs font-bold tracking-widest text-ink-2 uppercase"
|
<label for="to" class="mb-2 block text-xs font-bold tracking-widest text-ink-2 uppercase"
|
||||||
>{m.docs_filter_label_to()}</label
|
>{m.docs_filter_label_to()}</label
|
||||||
>
|
>
|
||||||
<input
|
<DateInput
|
||||||
type="date"
|
|
||||||
id="to"
|
id="to"
|
||||||
bind:value={to}
|
bind:value={to}
|
||||||
onchange={onSearch}
|
onchange={onSearch}
|
||||||
class="block w-full border-line py-2.5 text-sm shadow-sm"
|
class="block w-full rounded-md border border-line bg-surface px-3 py-2.5 text-sm text-ink shadow-sm placeholder:text-ink-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ let { fromDate = $bindable(''), toDate = $bindable(''), onapplyFilters }: Props
|
|||||||
bind:value={fromDate}
|
bind:value={fromDate}
|
||||||
onchange={() => onapplyFilters()}
|
onchange={() => onapplyFilters()}
|
||||||
placeholder={m.conv_strip_from_placeholder()}
|
placeholder={m.conv_strip_from_placeholder()}
|
||||||
class="block w-full border-line px-3 py-2.5 text-sm text-ink shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
class="block w-full rounded-md border border-line bg-surface px-3 py-2.5 text-sm text-ink shadow-sm placeholder:text-ink-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ let { fromDate = $bindable(''), toDate = $bindable(''), onapplyFilters }: Props
|
|||||||
bind:value={toDate}
|
bind:value={toDate}
|
||||||
onchange={() => onapplyFilters()}
|
onchange={() => onapplyFilters()}
|
||||||
placeholder={m.conv_strip_to_placeholder()}
|
placeholder={m.conv_strip_to_placeholder()}
|
||||||
class="block w-full border-line px-3 py-2.5 text-sm text-ink shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
class="block w-full rounded-md border border-line bg-surface px-3 py-2.5 text-sm text-ink shadow-sm placeholder:text-ink-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user