ebailey78 / shinyBS

Twitter Bootstrap Components for Shiny
182 stars 47 forks source link

bsModal and dateinput #46

Closed Persedes closed 9 years ago

Persedes commented 9 years ago

Hi there,

I am trying to add a dateinput to a bsModal, however the calendar widget is in the background/ behind the Modal and can not be used. Any ideas?

image

library(shiny)
library(shinyBS)

shinyApp(
  ui =fluidPage(
    mainPanel(
      dataTableOutput("x1"),
      bsModal("modalExample", "Data Table", "rowtogg", size = "large",
              dateInput("dates", "Enter date"))
    )
  ),

  server = function(input, output, session) {
    output$x1 <- renderDataTable({
      DT::datatable( data.frame(x = 1:4), selection = "single" )
    }, server = FALSE)

    observeEvent({
      input[[paste( "x1", "rows_selected", sep="_" )]]
    },{

      toggleModal(session, "modalExample", "open")
    })
  }
)
mheiser-md commented 9 years ago

Added this into the modal and it worked: (Thanks to Yenne Info at stackoverflow)

tags$style( type = "text/css", ".datepicker{z-index: 1100 !important;}")