Skip to contents

This function allow to delete all schedules and clear view.

Usage

cal_proxy_clear(proxy)

Arguments

proxy

A calendar_proxy() htmlwidget object.

Value

A calendar_proxy object.

Examples


library(shiny)
library(toastui)

ui <- fluidPage(
  tags$h2("Clear all schedules"),
  actionButton("clear", "Clear all", class = "btn-block btn-danger"),
  calendarOutput("my_calendar")
)

server <- function(input, output, session) {

  output$my_calendar <- renderCalendar({
    calendar(cal_demo_data(), navigation = FALSE)
  })

  observeEvent(input$clear, cal_proxy_clear("my_calendar"))
}

if (interactive())
  shinyApp(ui, server)