Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar ID+"_add" not possible anymore after toastui > 0.2.1 #46

Open
trafficonese opened this issue Apr 18, 2024 · 1 comment
Open

Comments

@trafficonese
Copy link

I am aware that the JS-library has changed, but I couldnt find any solution to this.
I need to create custom Popups to create additional calendar entries. This example app used to work with v0.2.1 and I dont know how to migrate it..

Those issues seem related:
#8
#36

library(shiny)
library(toastui)

ui <- fluidPage(
  calendarOutput("calendar")
)

server <- function(input, output, session) {
  output$calendar <- renderCalendar({
    calendar(NULL, view = "month",
             navigation = TRUE,taskView = F, height = 500,
             useCreationPopup = FALSE, isReadOnly = FALSE)
  })
  
  observeEvent(input$calendar_add, {
    print("input$calendar_id_click")
    inp <- input$calendar_id_click
    removeUI("#calendradd")
    shiny::insertUI(selector = "#calendar", where = "beforeBegin",
                    ui = selectInput("asd123", label = "Select", choices = 1:9))
  })
}

shinyApp(ui, server)
@pvictor
Copy link
Member

pvictor commented Apr 29, 2024

Hello,
There's an example here on how tu use a custom popup to create an entry : https://github.com/dreamRs/toastui/blob/master/inst/examples/calendar-custom-create.R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants