This is what I am trying. On focus of TextInput datepicker does get open but after selecting date it is not getting populated in TextInput field.
Where I am making mistake?
<TouchableOpacity>
<TextInput style={styles.textinputstyle} onFocus={()=>{setOpen(true)}} />
</TouchableOpacity>
<DatePicker modal mode="date" dateFormat="MM-DD-YYYY" open={open} date={date} onConfirm={date=> { setOpen(false) setDate(date) }} onCancel={() => { setOpen(false) }} />
2
Answers
set editable = false in TextInput
This will help you