|
|
|
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
|
|
|
|
import { useEventsListener } from '@/shared' |
|
|
|
|
import React, { useRef, useState } from 'react' |
|
|
|
|
import { StyleSheet, View, Text } from 'react-native' |
|
|
|
|
import { StyleSheet, View, Text, Platform } from 'react-native' |
|
|
|
|
import { BottomModal, Button, FakeDateInputForm } from '@/shared/components' |
|
|
|
|
import { $size } from '@/shared/helpers' |
|
|
|
|
import RBSheet from 'react-native-raw-bottom-sheet' |
|
|
|
@ -62,11 +62,20 @@ export const FinishTaskModal = () => {
@@ -62,11 +62,20 @@ export const FinishTaskModal = () => {
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (dateState.isShowCalendar) |
|
|
|
|
return updateModalHeight($size(580, 560), tasksCount) |
|
|
|
|
return updateModalHeight( |
|
|
|
|
Platform.OS === 'ios' ? $size(630, 620) : $size(630, 620), |
|
|
|
|
tasksCount, |
|
|
|
|
) |
|
|
|
|
if (dateState.isShowTimePicker) |
|
|
|
|
return updateModalHeight($size(460, 400), tasksCount) |
|
|
|
|
return updateModalHeight( |
|
|
|
|
Platform.OS === 'ios' ? $size(490, 400) : $size(460, 400), |
|
|
|
|
tasksCount, |
|
|
|
|
) |
|
|
|
|
if (!dateState.isShowCalendar && !dateState.isShowTimePicker) |
|
|
|
|
return updateModalHeight($size(270, 250), tasksCount) |
|
|
|
|
return updateModalHeight( |
|
|
|
|
Platform.OS === 'ios' ? $size(280, 260) : $size(280, 260), |
|
|
|
|
tasksCount, |
|
|
|
|
) |
|
|
|
|
}, [dateState, tasksCount]) |
|
|
|
|
|
|
|
|
|
const updateModalHeight = ( |
|
|
|
@ -163,6 +172,8 @@ export const FinishTaskModal = () => {
@@ -163,6 +172,8 @@ export const FinishTaskModal = () => {
|
|
|
|
|
}} |
|
|
|
|
locale={'uk'} |
|
|
|
|
mode={'time'} |
|
|
|
|
is24hourSource="locale" |
|
|
|
|
androidVariant="nativeAndroid" |
|
|
|
|
textColor={theme.$textPrimary} |
|
|
|
|
maximumDate={new Date()} |
|
|
|
|
style={styles.timePicker} |
|
|
|
|