Merge pull request #466 from larsl-net/calendar-collection-range

Calendar collection range
This commit is contained in:
Sean Morley
2025-01-23 17:44:00 -05:00
committed by GitHub

View File

@@ -90,7 +90,9 @@
if (transportations) { if (transportations) {
dates = dates.concat( dates = dates.concat(
transportations.map((transportation) => ({ transportations
.filter((i) => i.date)
.map((transportation) => ({
id: transportation.id, id: transportation.id,
start: transportation.date || '', // Ensure it's a string start: transportation.date || '', // Ensure it's a string
end: transportation.end_date || transportation.date || '', // Ensure it's a string end: transportation.end_date || transportation.date || '', // Ensure it's a string
@@ -162,6 +164,9 @@
(new Date(collection.end_date).getTime() - new Date(collection.start_date).getTime()) / (new Date(collection.end_date).getTime() - new Date(collection.start_date).getTime()) /
(1000 * 60 * 60 * 24) (1000 * 60 * 60 * 24)
) + 1; ) + 1;
// Update `options.evdateents` when `collection.start_date` changes
options = { ...options, date: collection.start_date };
} }
if (collection.transportations) { if (collection.transportations) {
transportations = collection.transportations; transportations = collection.transportations;