Set a custom time zone. You can add secondary timezone in the weekly/daily view.
Usage
cal_timezone(
cal,
timezoneName = NULL,
displayLabel = NULL,
tooltip = NULL,
extra_zones = NULL,
offsetCalculator = NULL
)
Arguments
- cal
A
calendar()
object.- timezoneName
timezone name (time zone names of the IANA time zone database, such as 'Asia/Seoul', 'America/New_York'). Basically, it will calculate the offset using 'Intl.DateTimeFormat' with the value of the this property entered.
- displayLabel
The display label of your timezone at weekly/daily view(e.g. 'GMT+09:00')
- tooltip
The tooltip(e.g. 'Seoul')
- extra_zones
A
list
with additional timezones to be shown in left timegrid of weekly/daily view.- offsetCalculator
Javascript function. If you define the 'offsetCalculator' property, the offset calculation is done with this function.
Note
Online JavaScript documentation: https://github.com/nhn/tui.calendar/blob/main/docs/en/apis/options.md#timezone
Examples
library(toastui)
calendar(view = "week", defaultDate = "2021-06-18") %>%
cal_schedules(
title = "My schedule",
start = "2021-06-18T10:00:00",
end = "2021-06-18T17:00:00",
category = "time"
) %>%
# Set primary timezone and add secondary timezone
cal_timezone(
timezoneName = "Europe/Paris",
displayLabel = "GMT+02:00",
tooltip = "Paris",
extra_zones = list(
list(
timezoneName = "Asia/Seoul",
displayLabel = "GMT+09:00",
tooltip = "Seoul"
)
)
)