1

I was wondering on how to add text in each cells in the AgendaView (day). How would I allow text in the cell? I do not know where to start. All functionality in fullCalendar.js is still there.

EDIT: If there is a way without adding events with my personal text, that approach would be preferred. Every timeslot on everyday would have number.

enter image description here Background: I'm using the fullCalendar api for part of a reservation system I currently working on. I would like to display how many rooms are available during each time slot. The database will return a number from the range 0 to 11.

tosh
  • 337
  • 1
  • 3
  • 13
  • To my knowledge, without an event, I don't think this is possible. May I ask why you do not want to create an event? – Slyvain Sep 21 '15 at 19:21
  • The reason I do not want to create a event is because I would have to create an event for everyday, every hour. – tosh Sep 22 '15 at 17:38
  • Well, that's only 8765 events per year :) And there is obviously some optimisation to do (delete/disable past events, query the db only for the selected time range, etc.). But apart from creating an event for each slot, I am afraid your only solution would be to fork your own implementation: https://github.com/fullcalendar/fullcalendar – Slyvain Sep 23 '15 at 12:52
  • I see, that's depressing. Another quick question, is there a way or a method to create an event every hour? – tosh Sep 23 '15 at 15:59
  • I would get a starting date and an end date, and then loop that range adding an hour every iteration with http://php.net/manual/en/datetime.add.php if you code in PHP or http://stackoverflow.com/questions/1050720/adding-hours-to-javascript-date-object if JS. There might be a more efficient way, but I can't think of one right now. Good luck ;) – Slyvain Sep 24 '15 at 06:49
  • Thank you, for now I'll take this approach until I can think of a different solution. – tosh Sep 24 '15 at 18:12

0 Answers0