Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding events after loading JSON data #14

Closed
3-14159jam opened this issue Oct 5, 2018 · 2 comments
Closed

Adding events after loading JSON data #14

3-14159jam opened this issue Oct 5, 2018 · 2 comments

Comments

@3-14159jam
Copy link

First of all, I really love this calendar. I have tried a lot of calendars in the past few days but this was by far the best and easiest to implement.

I am currently having an issue with reloading the event indicators after loading JSON from the google Calendar API. The calendar runs the generateCalendarDateIndicators() function before the data is there however when I run it manually after I have the data, no new dots appear. I am currently running the code inside of its own activity instead of a fragment.

I am imagining that I need to have the calendar refresh the UI once I have the JSON data. I have tried a few different ideas for refreshing the UI but they all lead to refreshing the entire page which puts me in a big circle.

Any thoughts or suggestions would be well appreciated.

@rAseri
Copy link
Contributor

rAseri commented Oct 11, 2018

Hi and thanks for the feedback!

It's strange, because the Calendar was designed in such a way that each time when you are setting indicators (calendarView.datesIndicators = indicatorsList) the Calendar view is updated to display new indicators.

I have tested this scenario and all works fine:

  1. Init the Calendar with setupCalendar() method
  2. Asynchronously load some data for the Calendar then generate and set dates indicators (calendarView.datesIndicators = indicatorsList)
  3. New indicators are displayed

@rAseri rAseri closed this as completed Feb 15, 2019
@pavelsust
Copy link

how you add events?? i am stack on this. I can't add a date into the calendar as a event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants