From 90ca859b17a0779f9e280a5c968f98f551b4ea14 Mon Sep 17 00:00:00 2001 From: analuizaff Date: Fri, 8 Jan 2021 18:49:56 -0300 Subject: [PATCH] swaping datepicker for textinput --- .../screens/PluviometerSharingDataScreen.js | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js index 51ad156..7496468 100644 --- a/src/app/screens/PluviometerSharingDataScreen.js +++ b/src/app/screens/PluviometerSharingDataScreen.js @@ -22,18 +22,19 @@ import colors from "../config/colors"; const validationSchema = Yup.object().shape({ pluviometer: Yup.number().required().min(1).max(10000).label("pluviometer"), + data: Yup.string().min(1, "Por favor preencha a data"), images: Yup.array().min(1, "Por favor, selecione uma imagem."), }); function PluviometerSharingDataScreen(props) { const location = useLocation(); - - /*-------------------------------------------DATETIMEPICKER------------------------------------------------*/ + let dateTime = new Date().toString(); + /*-------------------------------------------DATETIMEPICKER------------------------------------------------ const { textStyle, defaultDate } = props; const [date, setDate] = useState(moment(defaultDate)) const [show, setShow] = useState(false); - let dateTime = new Date().toString(); + //---------------ios------------------------ const onChange = (e, selectedDate) => { setDate(moment(selectedDate)); @@ -69,7 +70,7 @@ function PluviometerSharingDataScreen(props) { /> ) } - /*---------------------------------------------------------------------------------------------------------*/ + ---------------------------------------------------------------------------------------------------------*/ return ( @@ -86,6 +87,7 @@ function PluviometerSharingDataScreen(props) {
{ @@ -116,7 +118,19 @@ function PluviometerSharingDataScreen(props) { Data da coleta: - + + + + + + {/* setShow(true)}> @@ -180,7 +194,8 @@ function PluviometerSharingDataScreen(props) { )} - + */} +