fullcalendar: Display a FullCalendar widget

Description Usage Arguments Examples

View source: R/fullcalendar.R

Description

This function creats a FullCalendar htmlwidget that will show up in the viewer pane, if you're running Rstudio, or in your Rmarkdown document.

Usage

1
2
fullcalendar(data = NULL, settings = list(), width = NULL,
  height = NULL, elementId = NULL)

Arguments

data

a data frame with one row per event where the columns needs to follow the naming conventions by FullCalendar shown here: https://fullcalendar.io/docs/event_data/Event_Object/ . This data frame will then be translated into a json array by means of jsonlite::toJSON. The required columns are title, a string, and start as string parseable as a date, for example, "2017-02-28".

settings

A list of settings for the FullCalendar. See here for the available settings: https://fullcalendar.io/docs/display/ .

width

Fixed width for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

height

Fixed height for widget (in css units). The default is NULL, which results in intelligent automatic sizing based on the widget's container.

elementId

Use an explicit element ID for the widget (rather than an automatically generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.

Examples

1
2
3
4
5
data = data.frame(title = paste("Event", 1:3),
                 start = c("2017-03-01", "2017-03-01", "2017-03-15"),
                 end = c("2017-03-02", "2017-03-04", "2017-03-18"),
                 color = c("red", "blue", "green"))
fullcalendar(data)

rasmusab/fullcalendar documentation built on Jan. 25, 2022, 6:28 p.m.