Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minDate causes duplicate react key warnings #146

Open
ostenning opened this issue Dec 19, 2017 · 5 comments
Open

minDate causes duplicate react key warnings #146

ostenning opened this issue Dec 19, 2017 · 5 comments

Comments

@ostenning
Copy link

When configuring the date-picker to use the minDate prop, multiple react warnings are produced.
This is what I am rendering:

<FormGroup validationState={this.state.validation.date}>
    <ControlLabel>Start Date</ControlLabel>
    <DatePicker
        id="formControlsStartDate"
        value={this.state.date}
        onChange={date => this.setState({ date })}
        minDate={(new Date()).toISOString()}
        showClearButton={false}
    />
    <FormControl.Feedback />
</FormGroup>

The warning produced:

Warning: flattenChildren(...): Encountered two children with the same key, 5. Child keys must be unique; when two children share a key, only the first child will be used.
in tr (created by DatePickerCalendar)
in tbody (created by DatePickerCalendar)
in table (created by DatePickerCalendar)
in DatePickerCalendar (created by DatePicker)
in div (created by Popover)
in div (created by Popover)
in Popover (created by DatePicker)
in Position (created by Overlay)
in Transition (created by Fade)
in Fade (created by Overlay)
in RootCloseWrapper (created by Overlay)

Proj. Dependencies:

"react": "^15.6.1",
"react-bootstrap": "^0.31.2",
"react-bootstrap-date-picker": "^5.1.0",

Kind regards.

@powellandy
Copy link

I also see this:

"react": "^15.6.2",
"react-bootstrap": "^0.31.3",
"react-bootstrap-date-picker": "^5.1.0",

@codrobin33
Copy link

I am also seeing this

"react": "^15.3.2",
"react-bootstrap": "^0.31.2",
"react-bootstrap-date-picker": "^5.1.0",

@MattJonesCreation
Copy link

I am also seeing this, was this ever resolved or even looked at? Is this repo deprecated?

@adam-bubela
Copy link

It the same warning is caused by the param maxDate. Anybody managed to fix it?

@MattJonesCreation
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants