Skip to content

Beginner Question: How to add events?! #247

Answered by hawkeye64
miatemma asked this question in Q&A
Discussion options

You must be logged in to vote

@miatemma You have two choices: 1) use the "day" slot, or 2) use the "week" slot. The "week" slot is a bit more complicated, but once you get the hang of things, it should get easier. For now, we'll stick with the "day" slot.

As each calendar cell is drawn, it calls the "day" slot. The slotted data contains { timestamp }. timestamp.date has the date in the form YYYY-MM-DD. You use this information to get your data and return it so it can be drawn in-place in the day slot.

As a side note, if you were fetching data from a server, you would use the @change emit, which contains start and end (which is beginning and end of each calendar month). Then fetch the data from the server between and i…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@miatemma
Comment options

@adgower
Comment options

@adgower
Comment options

Answer selected by miatemma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants