|
|
@ -18,6 +18,7 @@ import DateTimePicker from '@react-native-community/datetimepicker'; |
|
|
|
import { FontAwesome5 } from '@expo/vector-icons'; |
|
|
|
import { showMessage } from "react-native-flash-message"; |
|
|
|
import moment from 'moment'; |
|
|
|
import colors from "../config/colors"; |
|
|
|
|
|
|
|
const validationSchema = Yup.object().shape({ |
|
|
|
pluviometer: Yup.number().required().min(1).max(10000).label("pluviometer"), |
|
|
@ -121,8 +122,8 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
<TouchableOpacity style={styles.datepickerStyle} |
|
|
|
onPress={() => setShow(true)}> |
|
|
|
<View style={styles.datePickerView}> |
|
|
|
<View style={{ flexDirection:"row", justifyContent:"space-between", width: 280 }}> |
|
|
|
<Text style={{fontSize: 16, marginLeft: 15}}>{date.format('DD/MM/YYYY')}</Text> |
|
|
|
<View style={{ flexDirection: "row", justifyContent: "space-between", width: 280 }}> |
|
|
|
<Text style={{ fontSize: 16, marginLeft: 15 }}>{date.format('DD/MM/YYYY')}</Text> |
|
|
|
<FontAwesome5 style={styles.dateIcon} name="calendar-day" size={24} color="grey" /> |
|
|
|
</View> |
|
|
|
{Platform.OS !== 'ios' && show && renderDatePicker()} |
|
|
@ -141,10 +142,10 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
flexDirection: 'row', |
|
|
|
}} |
|
|
|
activeOpacity={1} |
|
|
|
visible={show}> |
|
|
|
onPress={() => setShow(false)} |
|
|
|
visible={show} |
|
|
|
onPress={() => setShow(false)}> |
|
|
|
<TouchableHighlight |
|
|
|
underlayColor={''} |
|
|
|
underlayColor={'#f8f4f4'} |
|
|
|
style={{ |
|
|
|
flex: 1, |
|
|
|
borderTopColor: 'primary', |
|
|
@ -157,21 +158,21 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
height: 256, |
|
|
|
overflow: 'hidden', |
|
|
|
}}> |
|
|
|
<View style={{ marginTop:20 }}> |
|
|
|
{ renderDatePicker } |
|
|
|
<View style={{ marginTop: 20 }}> |
|
|
|
{renderDatePicker()} |
|
|
|
</View> |
|
|
|
<TouchableHighlight |
|
|
|
underlayColor={'transparent'} |
|
|
|
onPress={() => onCancelPress()} |
|
|
|
onPress={() => console.log('Datepicker press')} |
|
|
|
style={(styles.btnText, styles.btnCancel)}> |
|
|
|
<Text>Cancelar</Text> |
|
|
|
</TouchableHighlight> |
|
|
|
|
|
|
|
<TouchableHighlight |
|
|
|
underlayColor={'transparent'} |
|
|
|
onPress={() => onDonePress()} |
|
|
|
onPress={() => console.log('Datepicker press')} |
|
|
|
style={(styles.btnText, styles.btnDone)}> |
|
|
|
<Text>OK</Text> |
|
|
|
<Text>Ok</Text> |
|
|
|
</TouchableHighlight> |
|
|
|
</View> |
|
|
|
</TouchableHighlight> |
|
|
@ -234,7 +235,8 @@ const styles = StyleSheet.create({ |
|
|
|
paddingHorizontal: 20, |
|
|
|
flexDirection: "row", |
|
|
|
alignItems: "center", |
|
|
|
justifyContent: "center" |
|
|
|
justifyContent: "center", |
|
|
|
color: colors.primary, |
|
|
|
}, |
|
|
|
btnCancel: { |
|
|
|
left: 0, |
|
|
|