|
|
@ -8,7 +8,7 @@ import { |
|
|
|
Platform, |
|
|
|
TouchableOpacity, |
|
|
|
} from "react-native"; |
|
|
|
import { FontAwesome5 } from "@expo/vector-icons"; |
|
|
|
import { MaterialCommunityIcons } from '@expo/vector-icons' |
|
|
|
import DateTimePicker from "@react-native-community/datetimepicker"; |
|
|
|
|
|
|
|
import moment from "moment"; |
|
|
@ -94,13 +94,15 @@ const FormDatePicker = (props) => { |
|
|
|
justifyContent: "space-between", |
|
|
|
}} |
|
|
|
> |
|
|
|
<View style={styles.dateIcon}> |
|
|
|
<MaterialCommunityIcons name="calendar-today" size={30} color="white" alignItems="center"/> |
|
|
|
</View> |
|
|
|
<View style={styles.dateInput}> |
|
|
|
<Text style={{ fontSize: dimensions.text.default }}> |
|
|
|
{" "} |
|
|
|
{date.format("DD/MM/YYYY")} {"\n"} {time.format("HH:mm")} |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
<FontAwesome5 name="calendar-day" size={30} color="grey" /> |
|
|
|
</View> |
|
|
|
{Platform.OS !== "ios" && show && renderDatePicker()} |
|
|
|
|
|
|
@ -188,12 +190,20 @@ const styles = StyleSheet.create({ |
|
|
|
justifyContent: "center", |
|
|
|
}, |
|
|
|
dateInput: { |
|
|
|
flex: 0.97, |
|
|
|
backgroundColor: colors.light, |
|
|
|
flex: 0.91, |
|
|
|
backgroundColor: colors.white, |
|
|
|
borderRadius: 25, |
|
|
|
padding: 18, |
|
|
|
padding: 10, |
|
|
|
marginVertical: 10, |
|
|
|
}, |
|
|
|
dateIcon:{ |
|
|
|
backgroundColor: colors.cerulean, |
|
|
|
padding: 10, |
|
|
|
width: 20, |
|
|
|
alignItems: "center", |
|
|
|
borderRadius: 5, |
|
|
|
flex: 0.09, |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
export default FormDatePicker; |