1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 14:29:36 +02:00

chore: Fix null values for adventure date and end date in AdventureModal and EditTransportation

This commit is contained in:
Sean Morley 2024-08-19 16:44:33 -04:00
parent a9f2ff63b7
commit a7d84c0a60
2 changed files with 7 additions and 1 deletions

View file

@ -164,7 +164,7 @@
</div>
<div class="mb-2">
<label for="start_date"
>{transportationToEdit.date ? 'Start' : ''}Date & Time <Calendar
>{transportationToEdit.date ? 'Start ' : ''}Date & Time <Calendar
class="inline-block mb-1 w-6 h-6"
/></label
><br />

View file

@ -47,6 +47,12 @@
return;
}
// make sure end date has a start date
if (newCollection.end_date && !newCollection.start_date) {
addToast('error', 'Please provide a start date');
return;
}
const response = await fetch(form.action, {
method: form.method,
body: formData