Jtapplecalendar: Show available dates from database (Firebase).

Created on 11 Jun 2017  路  6Comments  路  Source: patchthecode/JTAppleCalendar

First of all, thank you so much for the great project. Made my life way easier... 馃憤

I wanted to ask you how you would load dates from a Database (Firebase)?

In case it helps, Firebase Database stores data as JSON.

Thanks!

Most helpful comment

I think i found a way to do it, but haven't tested it yet.

  1. Download data from Firebase Database
  2. Add data to array
  3. Check if date property matches cellState.date inside calendar(_:cellForItemAt:cellState:indexPath:)
  4. If it matches, display custom graphic in calendar cell. If it doesn't mach, then leave it like it is.

What do you think?

All 6 comments

I think i found a way to do it, but haven't tested it yet.

  1. Download data from Firebase Database
  2. Add data to array
  3. Check if date property matches cellState.date inside calendar(_:cellForItemAt:cellState:indexPath:)
  4. If it matches, display custom graphic in calendar cell. If it doesn't mach, then leave it like it is.

What do you think?

sounds good.
but a dictionary is better.
there will be no looping to match a date in your data source.

True! That's even better... Firebase snapshots return a set of key value pairs 馃憤

i saw you posted a request for a vid on youtube. Even though you solved it (its easy right?) i'll still do a vid. If you have any more questions, you can open a new request :)

cheers man 馃嵒

@patchthecode Thanks so much for the fast reply's. Great support 馃憤

Have a nice day!

@avazquezpr I see you may have figured this out. I am using patchthecodes calendar to eventually set up users with a work schedule calendar. Right now I have set up logins using firebase and was wondering do I use google calendar api to pull into my app? Do you have a working sample of this calendar being pulled from google that I can see?

Was this page helpful?
0 / 5 - 0 ratings