Skip to contents

Options for daily, weekly view.

Usage

cal_week_options(
  cal,
  startDayOfWeek = NULL,
  daynames = NULL,
  narrowWeekend = NULL,
  workweek = NULL,
  showTimezoneCollapseButton = NULL,
  timezonesCollapsed = NULL,
  hourStart = NULL,
  hourEnd = NULL,
  scheduleView = TRUE,
  taskView = FALSE,
  ...
)

Arguments

cal

A calendar() object.

startDayOfWeek

Numeric. The start day of week.

daynames

Vector. The day names in weekly and daily. Default values are 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'.

narrowWeekend

Logical. Make weekend column narrow(1/2 width).

workweek

Logical. Show only 5 days except for weekend.

showTimezoneCollapseButton

Logical. Show a collapse button to close multiple timezones

timezonesCollapsed

Logical. An initial multiple timezones collapsed state.

hourStart

Numeric. Can limit of render hour start.

hourEnd

Numeric. Can limit of render hour end.

scheduleView

Show the all day and time grid in weekly, daily view. The default value is TRUE. If the value is a vector, it can be "allday", "time".

taskView

Show the milestone and task in weekly, daily view. The default value is FALSE. If the value is a vector, it can be "milestone", "task".

...

Additional options.

Value

A calendar htmlwidget.

Examples

# Change option for weekly view
calendar(view = "week") %>%
  cal_week_options(
    startDayOfWeek = 1,
    daynames = c("Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"),
    narrowWeekend = TRUE
  )