From 3db6c2b1fd06c167cd9022abaeea2089f37f3a02 Mon Sep 17 00:00:00 2001 From: kashaf-ansari-dev Date: Tue, 9 Jun 2026 12:06:59 +0500 Subject: [PATCH] mobile: remove today/tomorrow logic and set default expiry initial date to 1 week Signed-off-by: kashaf-ansari-dev --- .../mobile/app/components/date-picker/index.tsx | 2 +- .../app/components/ui/expiry-date/index.tsx | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/apps/mobile/app/components/date-picker/index.tsx b/apps/mobile/app/components/date-picker/index.tsx index 1f0f7ea87..49d170252 100644 --- a/apps/mobile/app/components/date-picker/index.tsx +++ b/apps/mobile/app/components/date-picker/index.tsx @@ -32,7 +32,7 @@ export default function DatePickerComponent(props: { onCancel: () => void; }) { const { colors, isDark } = useThemeColors(); - const dateRef = useRef(dayjs().add(1, "day").toDate()); + const dateRef = useRef(dayjs().add(1, "week").toDate()); const { width } = useWindowDimensions(); diff --git a/apps/mobile/app/components/ui/expiry-date/index.tsx b/apps/mobile/app/components/ui/expiry-date/index.tsx index e5eba35fd..f19c99f0d 100644 --- a/apps/mobile/app/components/ui/expiry-date/index.tsx +++ b/apps/mobile/app/components/ui/expiry-date/index.tsx @@ -42,22 +42,10 @@ export const ExpiryDate = ({ short?: boolean; } & ButtonProps) => { const { colors } = useThemeColors(); - const expiryValue = note?.expiryDate?.value; if (!expiryValue) return null; - const expiryDate = dayjs(expiryValue); - const now = dayjs(); - const isToday = expiryDate.isSame(now, "day"); - const isTomorrow = expiryDate.isSame(now.add(1, "day"), "day"); - - const formattedDate = isToday - ? "Today" - : isTomorrow - ? "Tomorrow" - : expiryDate.format("DD MMM YYYY"); - - const isUrgent = isToday || isTomorrow; + const formattedDate = dayjs(expiryValue).format("DD MMM YYYY"); return (