Finnur
Finnur

Reputation: 135

Customize the time slots in Fullcalendar

Is it possible to customize the time slots in the day and week view in the Fullcalendar plugin so it would look like a timetable that are used in schools for example.

To be specific what the requirement is: One slot could be from 08:00 to 08:45 and the next one could be from 08:45 to 09:00. Or even skip 5 minutes: One slot from 08:00 to 08:45 and then the next one begins 08:50.

Preferably you could set the time slots like events when you initialize the calendar.

I've not found any way to do this. Can someone here help me with this or just confirm that this is not possible?

Upvotes: 9

Views: 7302

Answers (2)

user1480019
user1480019

Reputation:

For those who are still looking for it:

There's a pull request made on the FullCalendar project. It does exactly what is described in this question with some more features. (such as showing or hiding the end slot time, custom HTML classes on slots, snapping policies for dragging events on slots, etc.)

The pull request has been closed for organizational reasons, but it will leverage when tackling the GitHub issue #472.

Screenshot of the timeslots pull request:

Screenshot

I hope this helps someone further.

Upvotes: 9

ganeshk
ganeshk

Reputation: 5621

I think this is not possible with the default build of FullCalendar. There are options like slotMinutes which let you customize the way the slots are displayed, but the timeSlots are displayed per hour by default. There is no option that let's you customize that display.

However, you could customize the code - fork it on github and change what you need.

Upvotes: 2

Related Questions