5

I've been trying to use shinyBS modals with dateInput. The problem is that the calendar widget is hidden behind the modal. Here is my example code:

library(shiny)
library(shinyBS)

shinyApp(
  ui =fluidPage(
    mainPanel(
      actionButton("button", label = "Open Modal"),
      bsModal("modalExample", "Data Table", "rowtogg", size = "small",
              fluidPage(dateInput("dates", "Enter date")))
    )
  ),



  server = function(input, output, session) {
    observeEvent({
      input$button
    },{
      toggleModal(session, "modalExample", "open")
    })
  }
)

A screenshot of the problem can be found at: https://github.com/ebailey78/shinyBS/issues/46, where I already asked the question. However it seems to me like this is a more "general" problem, so I was hoping someone over here could help me out.

EDIT: Thanks to Yenne Info it works by adding:

 tags$style(type = "text/css", ".datepicker{z-index: 1100 !important;}"),
Sean Slavin
  • 56
  • 10
plastikdusche
  • 235
  • 2
  • 10

0 Answers0