You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
DatePicker is not respecting value props. value props is not used.
To Reproduce
Steps to reproduce the behavior:
1. <DatePicker ... value={this.state.date} />
2. this.state.date not shown in <TextInput/>
Expected behavior
Expected to see value instead of placeholder or defaultDate
Desktop:
OS: Windows
Smartphone:
Device: Android emulator, guess everywhere
OS: Android
Version 10
Additional context
Wanted result is reached with little tweak to DatePicker.js is shown lower:
`...
const {focused, defaultDate, error} = this.state;
let {chosenDate} = this.state;
if (!chosenDate) {
chosenDate = this.props.value ? new Date(this.props.value) : undefined;
}
let inputStyle = [styles.input];
...`
The text was updated successfully, but these errors were encountered:
Describe the bug
DatePicker is not respecting
value
props.value
props is not used.To Reproduce
Steps to reproduce the behavior:
1.
<DatePicker ... value={this.state.date} />
2.
this.state.date
not shown in<TextInput/>
Expected behavior
Expected to see value instead of placeholder or defaultDate
Desktop:
Smartphone:
Additional context
Wanted result is reached with little tweak to DatePicker.js is shown lower:
`...
const {focused, defaultDate, error} = this.state;
...`
The text was updated successfully, but these errors were encountered: