[18.0][FIX] web_timeline: set date_stop to end of day for Date fields#3471
Open
[18.0][FIX] web_timeline: set date_stop to end of day for Date fields#3471
Conversation
When using Date fields (not DateTime) for date_stop in a timeline view, the item ends at 00:00:00 of the stop date instead of including the full day. This causes timeline items to appear one day shorter than expected. Set date_stop to end of day (23:59:59) when the field type is "date" so the timeline item correctly spans the entire last day. Fixes OCA#3349
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using Date fields (not DateTime) for
date_stopin a timeline view, items end one day before the expected end date. Thedate_stopis parsed as00:00:00of that day, so the timeline item ends at the start of the day instead of including the full day.The fix checks if the
date_stopfield type isdateand sets it to end of day using Luxon's.endOf("day"), so the item correctly spans through23:59:59of the last day.Steps to reproduce:
Datefields for start and end datesdate_start = 2026-03-10anddate_stop = 2026-03-142026-03-13instead of2026-03-14Fixes #3349