Open DevKarenC opened 5 years ago
Hi @DevKarenC 👋 - sorry for the late reply.
Right now it looks like the only way to clear everything would be to re-initialize the <AvailableTimes>
component. Selections are stored in local state across a few components and it's tricky to get access to them all. But if you do something like
<AvailableTimes key={this.state.resetIncrement}>
and then somewhere else
<button onClick={() => this.setState({ resetIncrement: this.state.resetIncrement + 1 })}>Reset</button>
I think that could work. Note that this is untested code.
I'm wondering if it's possible to clear all the times selections in the calendar. If not, I'm considering using jQuery to find and click on each of the calendar selections to delete them.
Thanks!