title: How to show date on text input after selecting on datetime picker?
body: <p>I'm trying to show date on the text input after user has selected a date on a datetime picker based on react-native-modal-datetime-picker library, on expo snack.</p>
  <p>However, I cant seem to show the date once it has been selected. May I know which part of this code below did I messed up.</p>
  <p>Thanks for any suggestions.</p>
  <pre><code>import React, {useState} from 'react';
  import { View, Button, TextInput, StyleSheet } from 'react-native';
  import DateTimePickerModal from &quot;react-native-modal-datetime-picker&quot;;
  
  export default function ShareExample() {
  
    const [date, SetDate] = useState('');
    const [isDatePickerVisible, setDatePickerVisibility] = useState(false);
  
    const showDatePicker = () =&gt; {
      setDatePickerVisibility(true);
    };
  
    const hideDatePicker = () =&gt; {
      setDatePickerVisibility(false);
    };
  
    const handleConfirm = (date) =&gt; {
      SetDate(date);
      hideDatePicker();
    };
  
  return(
    &lt;View style={styles.container}&gt;
    &lt;TextInput
              style={styles.textInput}
              value={date}
              placeholder=&quot;Date...&quot;/&gt;
    &lt;Button
    onPress={showDatePicker}
    title='Set Date'/&gt;
    &lt;DateTimePickerModal
            isVisible={isDatePickerVisible}
            mode=&quot;date&quot;
            onConfirm={handleConfirm}
            onCancel={hideDatePicker}
            /&gt;
    &lt;/View&gt;
  )
    
  }
  
  const styles = StyleSheet.create({
    container:{
      padding: 50
    },
    textInput:{
      borderWidth: 1,
      borderColor: 'black',
      marginBottom: 5
    }
  })
  </code></pre>