From 86a38ae53b3fa0bc9f63fdcacd2a587cf5c8d522 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Mon, 13 Jul 2026 12:23:32 +0500 Subject: [PATCH] mobile: change date-picker library in the app --- .../app/components/date-picker/index.tsx | 91 ------- .../date-time-picker/date-time-picker.tsx | 200 ++++++++++++++++ .../app/components/date-time-picker/index.tsx | 224 ++++++++++++++++++ .../app/components/properties/date-meta.tsx | 101 ++++---- apps/mobile/app/hooks/use-actions.tsx | 41 ++-- .../mobile/app/screens/add-reminder/index.tsx | 50 ++-- apps/mobile/app/screens/reminders/index.tsx | 4 + .../fonts/notesnook-icons.glyphmap.json | 2 +- apps/mobile/fonts/notesnook-icons.ttf | Bin 36968 -> 37020 bytes apps/mobile/ios/Podfile.lock | 64 ----- .../ios/nanoicons-fonts/notesnook-icons.ttf | Bin 36968 -> 37020 bytes apps/mobile/package-lock.json | 95 ++++---- apps/mobile/package.json | 4 +- .../react-native-ui-datepicker+3.3.0.patch | 166 +++++++++++++ apps/mobile/react-native.config.js | 2 +- packages/icons/svgs/chevron-left.svg | 1 + packages/intl/locale/en.po | 42 +++- packages/intl/locale/pseudo-LOCALE.po | 60 +++-- packages/intl/src/strings.ts | 8 +- 19 files changed, 809 insertions(+), 346 deletions(-) delete mode 100644 apps/mobile/app/components/date-picker/index.tsx create mode 100644 apps/mobile/app/components/date-time-picker/date-time-picker.tsx create mode 100644 apps/mobile/app/components/date-time-picker/index.tsx create mode 100644 apps/mobile/patches/react-native-ui-datepicker+3.3.0.patch create mode 100644 packages/icons/svgs/chevron-left.svg diff --git a/apps/mobile/app/components/date-picker/index.tsx b/apps/mobile/app/components/date-picker/index.tsx deleted file mode 100644 index 62a86916b..000000000 --- a/apps/mobile/app/components/date-picker/index.tsx +++ /dev/null @@ -1,91 +0,0 @@ -/* -This file is part of the Notesnook project (https://notesnook.com/) - -Copyright (C) 2023 Streetwriters (Private) Limited - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -import React from "react"; -import { useThemeColors } from "@notesnook/theme"; -import { useRef } from "react"; -import { useWindowDimensions, View } from "react-native"; -import { defaultBorderRadius } from "../../utils/size"; -import { DefaultAppStyles } from "../../utils/styles"; -import DatePicker from "react-native-date-picker"; -import dayjs from "dayjs"; -import { strings } from "@notesnook/intl"; -import { Button } from "../ui/button"; - -export default function DatePickerComponent(props: { - onConfirm: (date: Date) => void; - onCancel: () => void; -}) { - const { colors, isDark } = useThemeColors(); - const dateRef = useRef(dayjs().add(1, "week").toDate()); - - const { width } = useWindowDimensions(); - - return ( - - { - close?.(); - }} - date={dateRef.current} - onDateChange={(date) => { - dateRef.current = date; - }} - /> - -