Skip to content

[Conflict] Shiny & jQuery-ui #1107

Closed
Closed

Description

@The-Dub

Hello everybody,

I wanted to report a bug/conflict I encountered between jQuery ui and shiny date inputs (dateInput and dateRangeInput). For a reason that i don't fully understand, if you load jquery ui and have a date inputs, the server will not load, and won't return any error message. This drove me crazy for a minute because i couldn't understand what was going on here.

A quick turnaround is to download a version of jQuery without the daterange widget, and everything will work fine. Below a quick snippet of code that illustrate the problem.

library(shiny)

ui <- fluidPage(
  # singleton(tags$head(tags$script(src="//code.jquery.com/ui/1.11.4/jquery-ui.js"))), #comment /uncomment out this line
  dateRangeInput("ricky", "this is a daterangeinput"),
  uiOutput("bobby")

)

server <- function(input, output) {
  output$bobby <- renderUI({
    HTML('<p>this will render if server.R loads properly</p>')
  })
}

shinyApp(ui=ui, server=server)

I don't really know if it's a bug per se or an expected behavior, so if anybody has more information on that, i'll take it!

Activity

  1. wch commented on Feb 11, 2016

    @wch
    Collaborator

    Unfortunately, there's a conflict between jQuery UI's datepicker and Shiny's datepicker, which also comes up here:
    https://github.com/rstudio/shiny/blob/68b85bd/R/jqueryui.R#L83-L86

    We don't really have a good solution at this point.

  2. The-Dub commented on Feb 11, 2016

    @The-Dub
    Author

    Ok, didn't know that!
    Now, I do, thanks for the explanation. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions