Andrii
Andrii

Reputation: 3043

How to make "Calendar" for R Shiny application?

There are a lot of JS libraries for making Calendar in web applications.

How to make an elegant Calendar solution with labeling dates like in Google Calendar for R Shiny applications?

Thanks!

Upvotes: 3

Views: 6653

Answers (1)

Pork Chop
Pork Chop

Reputation: 29407

Have a look at the fullcalendar package on github, alternatively you can Add a Google calendar to your website

library(shiny)
library(fullcalendar)

data = data.frame(title = paste("Event", 1:3),
                  start = c("2017-03-01", "2017-03-01", "2017-03-15"),
                  end = c("2017-03-02", "2017-03-04", "2017-03-18"),
                  color = c("red", "blue", "green"))

ui <- fluidPage(
  column(6,
         fullcalendarOutput("calendar", width = "100%", height = "200px")
  )
)

server <- function(input, output) {
  output$calendar <- renderFullcalendar({
    fullcalendar(data)
  })
}

shinyApp(ui, server)

enter image description here

Upvotes: 8

Related Questions