clauderic / react-infinite-calendar

✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.

Home Page:http://clauderic.github.io/react-infinite-calendar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handling events from onSelect will prevent the calendar from updating

mmmbacon opened this issue · comments

onSelect can handle events from parent component it resides in, but I believe it is losing it's reference to this and is not proceeding to update the calendar. It just fires the event and then hangs up. I noticed this because when you handle and event from onSelect, the date data will be sent to the event handler but then the calendar will not update with the new selected date. The only way I could get 'this' to be registered in the callback is to bind 'this' to the callback. I think this is the issue, it loses it's own this context.