I’m using jQuery Fullcalendar from arshaw.com/fullcalendar/ and I would like to replace day number with link to event, which I’m getting via JSON from database, like on this image:
I’ve got small calendar with only one event per day, so default display isn’t necessary for me. I need something simpler and cleaner.
Since I’m not very familiar with jQuery I can’t figure it myself.
Is there a way to replace this:
<div class="fc-day-number">5</div>
with link to event on that day?
Without modifying the source code of the calendar creating script, you can achieve the desired result with a bit of hacking. Suppose you have a JavaScript object that holds your event URLs like this:
This can be a result of a JSON request. You can then loop through all the days in the calendar and check if there’s a link for that day, then update the day number to contain the link:
Just run that snippet every time the calendar is loaded / opened. Without knowing more about the calendar, it’s impossible to say where this snippet should be exactly located.