fix(web): prevent resetting date input when entering 0 (#7415)

* fix(web): prevent resetting date input when entering 0

* resolve conflict

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Michel Heusschen
2024-02-27 04:07:49 +01:00
committed by GitHub
parent 99a002b947
commit 4272b496ff
5 changed files with 35 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
import { DateTime } from 'luxon';
import ConfirmDialogue from './confirm-dialogue.svelte';
import Combobox from './combobox.svelte';
import DateInput from '../elements/date-input.svelte';
export let initialDate: DateTime = DateTime.now();
@@ -74,7 +75,7 @@
<div class="mt-2" />
<div class="flex flex-col">
<label for="datetime">Date and Time</label>
<input
<DateInput
class="immich-form-input text-sm my-4 w-full"
id="datetime"
type="datetime-local"

View File

@@ -6,13 +6,15 @@
</script>
<script lang="ts">
import DateInput from '$lib/components/elements/date-input.svelte';
export let filters: SearchDateFilter;
</script>
<div id="date-range-selection" class="grid grid-cols-[repeat(auto-fit,minmax(10rem,1fr))] gap-5">
<label class="immich-form-label" for="start-date">
<span>START DATE</span>
<input
<DateInput
class="immich-form-input w-full mt-1 hover:cursor-pointer"
type="date"
id="start-date"
@@ -24,7 +26,7 @@
<label class="immich-form-label" for="end-date">
<span>END DATE</span>
<input
<DateInput
class="immich-form-input w-full mt-1 hover:cursor-pointer"
type="date"
id="end-date"