import React, { useState } from 'react'; import { StyleSheet, TouchableOpacity, View, Dimensions, Animated, Easing, ScrollView, } from 'react-native'; import { Text } from 'react-native-elements'; import * as Colors from './utils/Colors'; import * as Style from './utils/Style'; import TimePicker from './TimePicker'; import type { DateTimePickerProperties } from './properties/Properties'; import { parseDateToCalendarFormat } from './utils/DateUtils'; import { Status } from './utils/Status'; import type Time from './data/Time'; import CalendarWithTimer from './CalendarWithTimer'; const { height } = Dimensions.get('window'); const ModalBottomSheet = (params: DateTimePickerProperties) => { const animatedValue = new Animated.Value(0); const [startDate, setStartDate] = useState( parseDateToCalendarFormat(params.startDate) ); const [endDate, setEndDate] = useState( parseDateToCalendarFormat(params.endDate) ); const [isStartDateSelected, setIsStartDateSelected] = useState(true); const [isEndDateSelected, setIsEndDateSelected] = useState(false); /* let currentTime = new Date(); let currentHourRaw = currentTime.getHours(); let currentHour = currentHourRaw > 12 ? currentHourRaw - 12 : currentHourRaw; let currentMinutes = currentTime.getMinutes(); let currentTimeAmPm = currentTime.getHours() >= 12 ? 'PM' : 'AM'; */ /* const [startTime, setStartTime] = useState