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

this.props undefined #201

Closed
grinsteindavid opened this issue May 1, 2019 · 1 comment
Closed

this.props undefined #201

grinsteindavid opened this issue May 1, 2019 · 1 comment

Comments

@grinsteindavid
Copy link

grinsteindavid commented May 1, 2019

Hi!
I got this error
this.props undefined

from handleEvent

export default class Component extends React.Component {

handleEvent(event, picker) {
    alert(JSON.stringify([picker.startDate, picker.endDate]))
    this.props.onChange(picker)
}

render() {

    return (
        <DateRangePicker 
            startDate={this.props.startDate} 
            endDate={this.props.endDate}
            onApply={this.handleEvent}
            ranges={ranges}
        >
            <Input
                icon='calendar' 
                iconPosition='left'
                fluid={this.props.fluid || false}
                value={`${this.props.startDate} - ${this.props.endDate}`}
            />
        </DateRangePicker>
    )
}

}

<CustomDateRangePicker
startDate="1/1/2014"
endDate="1/2/2014"
onChange={(picker) => alert(picker.startDate)}
/>

@skratchdot
Copy link
Owner

closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater

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

2 participants