diff --git a/frontend/src/lib/components/AdventureModal.svelte b/frontend/src/lib/components/AdventureModal.svelte index 3054687..85db0a4 100644 --- a/frontend/src/lib/components/AdventureModal.svelte +++ b/frontend/src/lib/components/AdventureModal.svelte @@ -8,12 +8,16 @@ let fullStartDate: string = ''; let fullEndDate: string = ''; + let fullStartDateOnly: string = ''; + let fullEndDateOnly: string = ''; let allDay: boolean = true; // Set full start and end dates from collection if (collection && collection.start_date && collection.end_date) { fullStartDate = `${collection.start_date}T00:00`; fullEndDate = `${collection.end_date}T23:59`; + fullStartDateOnly = collection.start_date; + fullEndDateOnly = collection.end_date; } const dispatch = createEventDispatcher(); @@ -742,8 +746,8 @@ type="date" class="input input-bordered w-full" placeholder={$t('adventures.start_date')} - min={constrainDates ? fullStartDate : ''} - max={constrainDates ? fullEndDate : ''} + min={constrainDates ? fullStartDateOnly : ''} + max={constrainDates ? fullEndDateOnly : ''} bind:value={new_start_date} on:keydown={(e) => { if (e.key === 'Enter') { @@ -757,8 +761,8 @@ class="input input-bordered w-full" placeholder={$t('adventures.end_date')} bind:value={new_end_date} - min={constrainDates ? fullStartDate : ''} - max={constrainDates ? fullEndDate : ''} + min={constrainDates ? fullStartDateOnly : ''} + max={constrainDates ? fullEndDateOnly : ''} on:keydown={(e) => { if (e.key === 'Enter') { e.preventDefault(); @@ -848,6 +852,53 @@

{/if}
+