//This is an example code to get DatePicker//
import React, { useState, Component } from 'react';
//import react in our code.
import { View, StyleSheet, Platform, Button } from 'react-native';
import DateTimePicker from '@react-native-community/datetimepicker';

export default class MyDatePicker extends Component {
    constructor(props) {
        super(props);
    }
    
    render() {
        return (
            <View>
                <View style={styles.container}>

                </View>
            </View>
            )
        }
    }
    
    
    const styles = StyleSheet.create({
        container: {
            flex: 1,
            alignItems: 'center',
            justifyContent: 'center',
            marginTop: 50,
            padding: 16,
        },
    });

















    //import all the components we are going to use.
    //import DatePicker from the package we installed
    
    // function DatePicker() {
    
    //     const [date, setDate] = useState(new Date(1598051730000));
    //     const [mode, setMode] = useState('date');
    //     const [show, setShow] = useState(false);
    
    //     const onChange = (event, selectedDate) => {
    //         const currentDate = selectedDate || date;
    
    //         setDate(currentDate);
    //         setShow(Platform.OS === 'ios' ? true : false);
    //     };
    
    //     const showMode = currentMode => {
    //         setShow(true);
    //         setMode(currentMode);
    //     };
    
    //     const showDatepicker = () => {
    //         showMode('date');
    //     };
    
    //     const showTimepicker = () => {
    //         showMode('time');
    //     };
    
    //     return (
    //         <View>
    //             <View>
    //                 <Button onPress={showDatepicker} title="Show date picker!" />
    //             </View>
    //             <View>
    //                 <Button onPress={showTimepicker} title="Show time picker!" />
    //             </View>
    //             {show && (
    //                 <DateTimePicker
    //                     testID="dateTimePicker"
    //                     timeZoneOffsetInMinutes={0}
    //                     value={date}
    //                     mode={mode}
    //                     is24Hour={true}
    //                     display="default"
    //                     timeZoneOffsetInMinutes={0}
    //                     onChange={onChange}
    //                 />
    //             )}
    //         </View>
    
    //     );
    // }
