diff --git a/src/app/components/PickEventDateLocation.js b/src/app/components/PickEventDateLocation.js
index ce524b3..7f56ec2 100644
--- a/src/app/components/PickEventDateLocation.js
+++ b/src/app/components/PickEventDateLocation.js
@@ -8,7 +8,9 @@ import FormLocationPicker from "../components/forms/FormLocationPicker";
export default function PickEventDateLocation({
setDate = () => {},
+ date = undefined,
setTime = () => {},
+ time = undefined,
navigation = () => {},
location = true,
}) {
@@ -21,7 +23,8 @@ export default function PickEventDateLocation({
}}
>
+ // paddingBottom={24}
+ >
setDate(value)}
+ date={date}
onTimeChange={(value) => setTime(value)}
+ time={time}
/>
{location && (
diff --git a/src/app/screens/PluviometerRegisterScreen.js b/src/app/screens/PluviometerRegisterScreen.js
index 338b265..bd5fb3e 100644
--- a/src/app/screens/PluviometerRegisterScreen.js
+++ b/src/app/screens/PluviometerRegisterScreen.js
@@ -1,9 +1,7 @@
import React, { useState, useContext, useEffect } from "react";
import { StyleSheet, Text, View, ScrollView } from "react-native";
-import {
- Form,
- SubmitButton,
-} from "../components/forms";
+import { MaterialCommunityIcons, FontAwesome } from "@expo/vector-icons";
+import { Form, SubmitButton } from "../components/forms";
import Screen from "../components/Screen";
import { showMessage } from "react-native-flash-message";
import { dimensions, scaleDimsFromWidth } from "../config/dimensions";
@@ -14,137 +12,108 @@ import FormLocationPicker from "../components/forms/FormLocationPicker";
import { EventLocationContext } from "../context/EventLocationContext";
import SchoolPicker from "../components/SchoolPicker";
import { TouchableOpacity } from "react-native-gesture-handler";
-
-
+import DatePicker from "../components/DatePicker";
const dims = scaleDimsFromWidth(85, 85, 25);
function PluviometerRegisterScreen(props) {
- const context = useContext(EventLocationContext);
-
- useEffect(() => {
- context.defaultLocation();
- }, []);
+ const context = useContext(EventLocationContext);
- const location = context.eventCoordinates;
- const address = context.eventLocation;
- const [dateTime, setDateTime] = useState(moment());
- const [school, setSchool] = useState();
+ useEffect(() => {
+ context.defaultLocation();
+ }, []);
- return (
-
-
- );
+
+
+
+
+ );
}
const styles = StyleSheet.create({
- container: {
- padding: 10,
- flex: 1
- },
- image: {
- width: dims.width * 0.8,
- height: dims.height * 0.8,
- justifyContent: "center",
- alignItems: "center",
- },
- label: {
- fontSize: dimensions.text.secondary,
- fontWeight: "bold",
- textAlign: "left",
- color: colors.lightBlue,
- },
- title: {
- fontSize: 20,
- fontWeight: "bold",
- textAlign: "center",
- color: colors.primary,
- },
+ container: {
+ padding: 10,
+ },
+ image: {
+ width: dims.width * 0.8,
+ height: dims.height * 0.8,
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ label: {
+ fontSize: dimensions.text.secondary,
+ fontWeight: "bold",
+ textAlign: "left",
+ color: colors.lightBlue,
+ },
+ title: {
+ fontSize: 16,
+ fontWeight: "bold",
+ textAlign: "center",
+ color: colors.primary,
+ },
});
export default PluviometerRegisterScreen;
diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js
index cfaedc7..0ff6374 100644
--- a/src/app/screens/PluviometerSharingDataScreen.js
+++ b/src/app/screens/PluviometerSharingDataScreen.js
@@ -27,7 +27,7 @@ const validationSchema = Yup.object().shape({
function PluviometerSharingDataScreen(props) {
const context = useContext(EventLocationContext);
- const [dateTime, setDateTime] = useState(moment());
+ const [date, setDate] = useState(moment());
const [time, setTime] = useState(moment());
useEffect(() => {
@@ -71,7 +71,9 @@ function PluviometerSharingDataScreen(props) {