diff --git a/apps/mobile/app/components/date-picker/index.tsx b/apps/mobile/app/components/date-picker/index.tsx new file mode 100644 index 000000000..7abf8ee47 --- /dev/null +++ b/apps/mobile/app/components/date-picker/index.tsx @@ -0,0 +1,66 @@ +import { useThemeColors } from "@notesnook/theme"; +import { useRef } from "react"; +import { 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, "day").toDate()); + return ( + + { + close?.(); + }} + date={dateRef.current} + onDateChange={(date) => { + dateRef.current = date; + }} + /> + +