Skip to content

Commit

Permalink
[FIX] web: show event date/duration on mobile
Browse files Browse the repository at this point in the history
Issue:
    - when you go inside a calendar event on mobile,
    you can't see its time and duration

Steps To Reproduce:
    - In mobile view, go to calendar and create an event.
    - Click on the event and notice you can't see it's time and duration.

Solution:
   - We were unable to view the date time, and duration because,
     in the `computeDateTimeAndDuration` function, the record's
     `isTimeHidden` attribute is set to True.
    - This was set in the `normalizeRecord` function, where we return
     'isTimeHidden: isTimeHidden || !showTime'.
    - To resolve this issue we take into account `isSmall` in the
     `showTime` boolean to ensure it functions correctly on mobile
     devices.

opw-3829004
  • Loading branch information
kawkb committed Apr 26, 2024
1 parent ae03fe4 commit e1761e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web/static/src/views/calendar/calendar_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export class CalendarModel extends Model {

const showTime =
!(fieldMapping.all_day && rawRecord[fieldMapping.all_day]) &&
scale === "month" &&
(scale === "month" || this.env.isSmall) &&
startType !== "date" &&
start.day === end.day;

Expand Down

0 comments on commit e1761e7

Please sign in to comment.