diff --git a/LICENSE b/LICENSE index e13fb3a..792a64f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ AdventureLog: Self-hostable travel tracker and trip planner. - Copyright (C) 2024 Sean Morley + Copyright (C) 2023-2025 Sean Morley Contact: contact@seanmorley.com This program is free software: you can redistribute it and/or modify diff --git a/frontend/src/lib/components/CollectionModal.svelte b/frontend/src/lib/components/CollectionModal.svelte index 5c134e0..9f1acf9 100644 --- a/frontend/src/lib/components/CollectionModal.svelte +++ b/frontend/src/lib/components/CollectionModal.svelte @@ -51,6 +51,19 @@ collection.end_date = collection.start_date; } + if ( + collection.start_date && + collection.end_date && + collection.start_date > collection.end_date + ) { + addToast('error', $t('adventures.start_before_end_error')); + return; + } + + if (!collection.start_date && collection.end_date) { + collection.start_date = collection.end_date; + } + if (collection.id === '') { let res = await fetch('/api/collections', { method: 'POST',