Skip to content

[18.0][FIX] web_timeline: set date_stop to end of day for Date fields#3471

Open
dmoranp wants to merge 1 commit intoOCA:18.0from
dmoranp:18.0-fix-web-timeline-date-endofday
Open

[18.0][FIX] web_timeline: set date_stop to end of day for Date fields#3471
dmoranp wants to merge 1 commit intoOCA:18.0from
dmoranp:18.0-fix-web-timeline-date-endofday

Conversation

@dmoranp
Copy link
Contributor

@dmoranp dmoranp commented Mar 11, 2026

When using Date fields (not DateTime) for date_stop in a timeline view, items end one day before the expected end date. The date_stop is parsed as 00:00:00 of 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_stop field type is date and sets it to end of day using Luxon's .endOf("day"), so the item correctly spans through 23:59:59 of the last day.

Steps to reproduce:

  1. Create a model with Date fields for start and end dates
  2. Create a timeline view using those fields
  3. Create a record with date_start = 2026-03-10 and date_stop = 2026-03-14
  4. The timeline item ends on 2026-03-13 instead of 2026-03-14

Fixes #3349

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_timeline: Timeline view shows items ending one day before when using Date fields

1 participant