feat: Enhance date handling in AdventureModal and related components for improved localization and all-day event support

This commit is contained in:
Sean Morley
2025-03-18 21:07:34 -04:00
parent 876c5e83b4
commit f554bb8777
3 changed files with 54 additions and 46 deletions

View File

@@ -935,24 +935,25 @@
{@const dateString = adjustedDate.toISOString().split('T')[0]}
{@const dayAdventures =
groupAdventuresByDate(adventures, new Date(collection.start_date), numberOfDays)[
groupAdventuresByDate(adventures, new Date(collection.start_date), numberOfDays + 1)[
dateString
] || []}
{@const dayTransportations =
groupTransportationsByDate(
transportations,
new Date(collection.start_date),
numberOfDays
numberOfDays + 1
)[dateString] || []}
{@const dayLodging =
groupLodgingByDate(lodging, new Date(collection.start_date), numberOfDays)[
groupLodgingByDate(lodging, new Date(collection.start_date), numberOfDays + 1)[
dateString
] || []}
{@const dayNotes =
groupNotesByDate(notes, new Date(collection.start_date), numberOfDays)[dateString] ||
[]}
groupNotesByDate(notes, new Date(collection.start_date), numberOfDays + 1)[
dateString
] || []}
{@const dayChecklists =
groupChecklistsByDate(checklists, new Date(collection.start_date), numberOfDays)[
groupChecklistsByDate(checklists, new Date(collection.start_date), numberOfDays + 1)[
dateString
] || []}