mobile: remove today/tomorrow logic and set default expiry initial date to 1 week

Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
kashaf-ansari-dev
2026-06-09 12:06:59 +05:00
committed by Ammar Ahmed
parent 19a11dae26
commit 3db6c2b1fd
2 changed files with 2 additions and 17 deletions

View File

@@ -32,7 +32,7 @@ export default function DatePickerComponent(props: {
onCancel: () => void;
}) {
const { colors, isDark } = useThemeColors();
const dateRef = useRef<Date>(dayjs().add(1, "day").toDate());
const dateRef = useRef<Date>(dayjs().add(1, "week").toDate());
const { width } = useWindowDimensions();

View File

@@ -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 (
<Button
@@ -66,9 +54,6 @@ export const ExpiryDate = ({
fontSize={textStyle?.fontSize || AppFontSize.xs}
iconSize={iconSize || AppFontSize.sm}
type="secondary"
buttonType={
isUrgent ? { text: color || colors.primary.accent } : undefined
}
textStyle={{
marginRight: 0,
...textStyle