|
|
@@ -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'}
|