|
|
@ -36,10 +36,7 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
let dateTime = new Date().toString(); |
|
|
|
//---------------ios------------------------
|
|
|
|
const onChange = (e, selectedDate) => { |
|
|
|
setShow(false); |
|
|
|
if (selectedDate) { |
|
|
|
setDate(moment(defaultDate)); |
|
|
|
} |
|
|
|
setDate(moment(selectedDate)); |
|
|
|
} |
|
|
|
const onCancelPress = () => { |
|
|
|
setDate(moment(defaultDate)); |
|
|
@ -66,7 +63,8 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
timeZoneOffsetInMinutes={0} |
|
|
|
value={new Date(date)} |
|
|
|
mode="date" |
|
|
|
maximumDate={new Date()} |
|
|
|
minimumDate={new Date(moment().subtract(1, 'month'))} |
|
|
|
maximumDate={new Date(moment())} |
|
|
|
onChange={Platform.OS === 'ios' ? onChange : onAndroidChange} |
|
|
|
/> |
|
|
|
) |
|
|
@ -148,7 +146,7 @@ function PluviometerSharingDataScreen(props) { |
|
|
|
underlayColor={'#f8f4f4'} |
|
|
|
style={{ |
|
|
|
flex: 1, |
|
|
|
borderTopColor: 'primary', |
|
|
|
borderTopColor: colors.primary, |
|
|
|
borderTopWidth: 1, |
|
|
|
}} |
|
|
|
onPress={() => console.log('Datepicker press')}> |
|
|
|