Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Update component on change startDateAt #9

@paulomfr

Description

@paulomfr

Hi,

I'm trying make a custom navigation between months, but I am barred, because the component not update the render when update de startDateAt prop.

Ex:

// ...

this.state = {
    startAt: moment().toDate()
}

// ...

goToNextMonth() {
    this.setState({
        startAt: moment(this.state.startDateAt).add(1, 'months').toDate()
    })
}

// ...

<Calendar
    startDateAt={this.state.startAt}
    decorate={this.decorates}
    i18n={locale}
    onSelectDate={(date) => this.handleSelect(date)}
/>

<button className='agenda-btn next' onClick={this.goToNextMonth}>{monthName} >></button>

In the console is showing the correct data, but just is not updating the component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions