leabum
leabum

Reputation: 395

How do I access dateClickInfo in FullCalendar React

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

Answers (1)

Domagoj Vuković
Domagoj Vuković

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

Related Questions