Skip to contents

Define calendar properties for grouping schedules under common theme.

Usage

cal_props(cal, ...)

Arguments

cal

A calendar() object.

...

Either named arguments to use as calendar properties or a data.frame with rows as calendars and columns as properties. See https://nhn.github.io/tui.calendar/latest/CalendarInfo/ for options.

Value

A calendar htmlwidget.

Examples

library(toastui)

# Define theme for schedules
calendar(cal_demo_data()[, -c(9, 10, 11)]) %>%
  cal_props(
    list(
      id = "1",
      name = "PERSO",
      color = "lightblue",
      backgroundColor = "purple",
      borderColor = "magenta"
    ),
    list(
      id = "2",
      name = "WORK",
      color = "red",
      backgroundColor = "yellow",
      borderColor = "orange"
    )
  )