Reputation: 395
Let's say I have the following:
dateClick={this.handleDateClick}
and
handleDateClick = (arg) => {
this.setState({ modalShow: true });
alert(arg.dateString)
};
The alert gives me undefined. How do access the dateClickInfo Object inside the handler?
Upvotes: 0
Views: 198
Reputation: 178
You spelled it wrong.
Its arg.dateStr
not arg.dateString
according to docs here
By referencing dateString
, you are trying to get something that doesn't exist.
Upvotes: 1