Bläddra i källkod

double-tap text for trips

Viktoriia 2 veckor sedan
förälder
incheckning
393be11d1b

+ 9 - 2
src/components/Calendars/RangeCalendar/index.tsx

@@ -1,5 +1,5 @@
 import React, { useEffect, useState } from 'react';
-import { View } from 'react-native';
+import { View, Text } from 'react-native';
 import { Modal } from '../../Modal';
 import DateTimePicker, { DateType } from 'react-native-ui-datepicker';
 import dayjs from 'dayjs';
@@ -34,7 +34,8 @@ export default function RangeCalendar({
   initialStartDate,
   initialEndDate,
   initialYear,
-  initialMonth
+  initialMonth,
+  withHint = false
 }: {
   isModalVisible: boolean;
   closeModal: (startDate?: string | null, endDate?: string | null) => void;
@@ -49,6 +50,7 @@ export default function RangeCalendar({
   initialEndDate?: string | null;
   initialYear?: number;
   initialMonth?: number;
+  withHint?: boolean;
 }) {
   const [selectedStartDate, setSelectedStartDate] = useState<string | null>(null);
   const [selectedEndDate, setSelectedEndDate] = useState<string | null>(null);
@@ -185,6 +187,11 @@ export default function RangeCalendar({
       headerTitle={allowRangeSelection ? 'Select Dates' : 'Select Date'}
     >
       <View style={styles.modalContent}>
+        {startDate && endDate && withHint ? (
+          <Text style={{ color: Colors.TEXT_GRAY, fontSize: 12, textAlign: 'center', fontWeight: '500' }}>
+            Double-tap to mark the first day of your trip.
+          </Text>
+        ) : null}
         <DateTimePicker
           key={`${currentMonth}-${currentYear}`}
           mode={allowRangeSelection ? 'range' : 'single'}

+ 1 - 0
src/screens/InAppScreens/TravelsScreen/AddNewTrip2025Screen/index.tsx

@@ -761,6 +761,7 @@ const AddNewTripScreen = ({ route }: { route: any }) => {
             ? regions[calendarVisibleForIndex].visitStartDate.month
             : undefined
         }
+        withHint={true}
       />
       <WarningModal
         type={'delete'}