diff --git a/client/utils/planning.ts b/client/utils/planning.ts index 5e2a6a280..f0802c6b3 100644 --- a/client/utils/planning.ts +++ b/client/utils/planning.ts @@ -1397,10 +1397,10 @@ function getDefaultCoverageDueDate( ): moment.Moment | null { let coverageTime: moment.Moment = null; - if (eventItem) { - coverageTime = moment(eventItem?.dates?.end); - } else if (planningItem.planning_date) { - coverageTime = moment('' + planningItem.planning_date); + if (planningItem?.event_item == null) { + coverageTime = moment(planningItem?.planning_date || moment()); + } else if (eventItem) { + coverageTime = moment(eventItem?.dates?.end || moment()); } if (!coverageTime) {