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()) %>%
  cal_props(
    list(
      id = 1,
      name = "PERSO",
      color = "white",
      bgColor = "steelblue",
      borderColor = "steelblue"
    ),
    list(
      id = 2,
      name = "WORK",
      color = "white",
      bgColor = "forestgreen",
      borderColor = "forestgreen"
    )
  )