toastui
toastui copied to clipboard
Removing dates from the weekly calendar
Hi. Thank you for creating this wonderful htmlwidget.
I have the created a weekly calendar below:
library(toastui)
calendar(view="week", defaultDate = NULL) %>% cal_week_options(workweek = TRUE, hourStart = 7.5, hourEnd = 24)
This line of the code gives the following output:
How can I remove the dates i.e. 21, 22, 23, 24, 25 and just have Monday-Friday as the labels? I am trying use cal_template
but I am not sure how that works for R as the documentation is for JS . Any help would be appreciated!
Hello, Have you succeeded ?
Here's a solution with using cal_template()
:
library(toastui)
calendar(view="week", defaultDate = NULL) %>%
cal_week_options(workweek = TRUE, hourStart = 7.5, hourEnd = 24) %>%
cal_template(
weekDayname = JS(
"function(model) {",
"var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];",
"return '<span class=\"tui-full-calendar-dayname-name\">' + days[model.day] + '</span>';",
"}"
)
)
Victor
@pvictor I did succeed in creating it! Thank you so much!