mirror of
https://github.com/urosran/cally.git
synced 2025-08-25 21:59:39 +00:00
start on 0 seconds
This commit is contained in:
@ -12,7 +12,7 @@ import {
|
||||
} from "react-native-ui-lib";
|
||||
import {ScrollView, TouchableOpacity} from "react-native-gesture-handler";
|
||||
import {useSafeAreaInsets} from "react-native-safe-area-context";
|
||||
import {useEffect, useState} from "react";
|
||||
import {useState} from "react";
|
||||
import {MaterialIcons} from "@expo/vector-icons";
|
||||
import {PickerMultiValue} from "react-native-ui-lib/src/components/picker/types";
|
||||
import {useAuthContext} from "@/contexts/AuthContext";
|
||||
@ -45,8 +45,16 @@ export const ManuallyAddEventModal = ({
|
||||
const [title, setTitle] = useState<string>("");
|
||||
|
||||
const [isAllDay, setIsAllDay] = useState(false);
|
||||
const [startTime, setStartTime] = useState(initialDate ?? new Date());
|
||||
const [endTime, setEndTime] = useState(initialDate ? addHours(initialDate, 1) : new Date());
|
||||
const [startTime, setStartTime] = useState(() => {
|
||||
const date = initialDate ?? new Date();
|
||||
date.setSeconds(0, 0);
|
||||
return date;
|
||||
});
|
||||
const [endTime, setEndTime] = useState(() => {
|
||||
const date = initialDate ? addHours(initialDate, 1) : new Date();
|
||||
date.setSeconds(0, 0);
|
||||
return date;
|
||||
});
|
||||
|
||||
const [startDate, setStartDate] = useState(initialDate ?? new Date());
|
||||
const [endDate, setEndDate] = useState(initialDate ?? new Date());
|
||||
|
Reference in New Issue
Block a user