mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-05 13:15:18 +02:00
Merge pull request #466 from larsl-net/calendar-collection-range
Calendar collection range
This commit is contained in:
commit
8fef53fd24
1 changed files with 11 additions and 6 deletions
|
@ -90,12 +90,14 @@
|
||||||
|
|
||||||
if (transportations) {
|
if (transportations) {
|
||||||
dates = dates.concat(
|
dates = dates.concat(
|
||||||
transportations.map((transportation) => ({
|
transportations
|
||||||
id: transportation.id,
|
.filter((i) => i.date)
|
||||||
start: transportation.date || '', // Ensure it's a string
|
.map((transportation) => ({
|
||||||
end: transportation.end_date || transportation.date || '', // Ensure it's a string
|
id: transportation.id,
|
||||||
title: transportation.name + (transportation.type ? ` (${transportation.type})` : '')
|
start: transportation.date || '', // Ensure it's a string
|
||||||
}))
|
end: transportation.end_date || transportation.date || '', // Ensure it's a string
|
||||||
|
title: transportation.name + (transportation.type ? ` (${transportation.type})` : '')
|
||||||
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue