bsplus icon indicating copy to clipboard operation
bsplus copied to clipboard

bs_tooltip is not working with dateRangeInput/dateInput in Shiny

Open phileas-condemine opened this issue 5 years ago • 2 comments

the package bsplus is great and easy to use but it seems it doesn't seem to handle dateRangeInput. Is that a bug ?

 Error in .tag_validate(tag, name = "div", class = "form-group shiny-input-container") : 
  class is: shiny-date-range-input form-group shiny-input-container, needs to be: form-group shiny-input-container 

It works perfectly with selectInput and most common inputs

Without tooltip it's OK, my code runs

## Only run examples in interactive R sessions
if (interactive()) {

  ui <- fluidPage(
    dateRangeInput("daterange1", "Date range:",
                   start = "2001-01-01",
                   end   = "2010-12-31")    
  )    ,
    selectInput("date", "Date:",
                   choices = c("me","you"))%>%
    shinyInput_label_embed(
      icon("question-circle") %>%
        bs_embed_tooltip(title = "choose your date range dude !")
    )


  shinyApp(ui, server = function(input, output) { })
}

with tooltip it doesn't...

## Only run examples in interactive R sessions
if (interactive()) {

  ui <- fluidPage(
    dateRangeInput("daterange1", "Date range:",
                   start = "2001-01-01",
                   end   = "2010-12-31")%>%
      shinyInput_label_embed(
        icon("question-circle") %>%
          bs_embed_tooltip(title = "choose your date range dude !")
      )    ,
    selectInput("date", "Date:",
                   choices = c("me","you"))%>%
    shinyInput_label_embed(
      icon("question-circle") %>%
        bs_embed_tooltip(title = "choose your date range dude !")
    )



  )

  shinyApp(ui, server = function(input, output) { })
}

It doesn't work with dateInput either...

https://stackoverflow.com/questions/55633392/r-bsplus-package-bs-tooltip-is-not-working-with-daterangeinput-dateinput-in-sh

phileas-condemine avatar Apr 12 '19 16:04 phileas-condemine

Has anyone found a workaround for this bug?

micahwilhelm avatar Apr 30 '20 10:04 micahwilhelm

I think this can be fixed by making an internal validation-function a bit more lenient.

ijlyttle avatar May 17 '20 00:05 ijlyttle