From 9603831def554e56924c89d34a5f91f31f0a57e1 Mon Sep 17 00:00:00 2001
From: Hariom Balhara <1780212+hariombalhara@users.noreply.github.com>
Date: Tue, 17 Feb 2026 13:22:16 +0530
Subject: [PATCH] refactor: update BookingHistory component to use date-fns for
timestamp formatting (#27851)
Replaced dayjs with date-fns for better performance and consistency in date handling. Added Tooltip for displaying formatted timestamps and improved search functionality by translating field labels and values. Cleaned up code for better readability.
---
.../components/BookingHistory.tsx | 36 ++++++++++++-------
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/apps/web/modules/booking-audit/components/BookingHistory.tsx b/apps/web/modules/booking-audit/components/BookingHistory.tsx
index 2668f1af5c..0889689d64 100644
--- a/apps/web/modules/booking-audit/components/BookingHistory.tsx
+++ b/apps/web/modules/booking-audit/components/BookingHistory.tsx
@@ -1,6 +1,5 @@
"use client";
-import dayjs from "@calcom/dayjs";
import type { AuditActorType } from "@calcom/features/booking-audit/lib/repository/IAuditActorRepository";
import ServerTrans from "@calcom/lib/components/ServerTrans";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -10,6 +9,8 @@ import { Button } from "@calcom/ui/components/button";
import { FilterSearchField, Select } from "@calcom/ui/components/form";
import { Icon, type IconName } from "@calcom/ui/components/icon";
import { SkeletonText } from "@calcom/ui/components/skeleton";
+import { Tooltip } from "@calcom/ui/components/tooltip";
+import { format, formatDistanceToNow } from "date-fns";
import Link from "next/link";
import { useState } from "react";
@@ -286,7 +287,9 @@ function BookingLogsTimeline({ logs }: BookingLogsTimelineProps) {
{actorRole && {` (${t(actorRole)})`}}
•
- {dayjs(log.timestamp).fromNow()}
+