diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 5279f17..4423911 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -879,10 +879,18 @@ const Index = () => { const isToday = startDate.toDateString() === new Date().toDateString(); const isSoon = startDate.getTime() - new Date().getTime() < 30 * 60 * 1000 && startDate > new Date(); + // Détecter les événements "toute la journée" (all_day OU heure à 00:00 ou 01:00) + const isAllDay = event.all_day || + (startDate.getHours() === 0 && startDate.getMinutes() === 0) || + (startDate.getHours() === 1 && startDate.getMinutes() === 0 && endDate.getHours() === 1); + return (
{isToday ? "Aujourd'hui" : startDate.toLocaleDateString('fr-FR', { day: '2-digit', month: '2-digit' })} - {event.all_day ? ' - Toute la journée' : ` à ${startDate.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' })}`} + {isAllDay ? ' - Toute la journée' : ` à ${startDate.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' })}`}
{event.location && (