TimeGrid View
A TimeGrid view displays one or more days side by side, against a vertical axis of time. The time axis usually runs from midnight to midnight. Either install via script tags or ES build system.
There are numerous other options throughout the docs that affect the display of TimeGrid view, such as the date/time display options and locale-related options.
Week & Day View#
The following example shows how to toggle between timeGridWeek and timeGridDay:
import { Calendar } from 'fullcalendar'
import timeGridPlugin from 'fullcalendar/timegrid'
const calendar = new Calendar(calendarEl, {
plugins: [timeGridPlugin],
initialView: 'timeGridWeek',
headerToolbar: {
left: 'prev,next',
center: 'title',
right: 'timeGridWeek,timeGridDay' // user can switch between the two
}
}) Custom Duration#
You can create TimeGrid views with arbitrary durations. The following creates a 4-day view:
import { Calendar } from 'fullcalendar'
import timeGridPlugin from 'fullcalendar/timegrid'
const calendar = new Calendar(calendarEl, {
plugins: [timeGridPlugin],
initialView: 'timeGridFourDay',
views: {
timeGridFourDay: {
type: 'timeGrid',
duration: { days: 4 }
}
}
}) View-Specific Options
eventMinHeight In timeGrid view, the minimum height an event is allowed to be.eventShortHeight In timeGrid view, the height threshold for when an event has a "short" style.slotEventOverlap Determines if timed events in TimeGrid view should visually overlap.slotMinHeight Determines how tall each of the time-axis slots will be.allDaySlot Determines if the "all-day" slot is displayed at the top of the calendar.eventPrintLayout Controls how events are rendered in TimeGrid view when printing.
Render Hooks
weekNumberHeader In TimeGrid view, week numbers appear in the header above the time axis.allDayHeader Customize the cell in the header area of TimeGrid view that labels the all-day section.allDayDivider Customize the divider line beneath the all-day section in TimeGrid view.dayLane In TimeGrid view, a "day lane" is the vertical column of time slots for a given day.
See Also
eventMaxStack For timeline view, the maximum number of events that stack top-to-bottom.slotDuration The frequency for displaying time slots.slotHeaderFormat Determines the text that will be displayed within a time slot.slotHeaderInterval The frequency that the time slots should be labeled with text.slotMinTime Determines the first time slot that will be displayed for each day.slotMaxTime Determines the last time slot that will be displayed for each day.slotHeader Customize the slot headers, where TimeGrid and Timeline views display their date/time text.slotLane Customize the slot lane elements in timegrid and timeline views.expandRows If the rows of a given view don't take up the entire height, they will expand to fit.nowIndicator Whether or not to display a marker indicating the current time.scrollTime Determines how far forward the scroll pane is initially scrolled.