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

Fix URL-encoded bookmarking with date/date-time sliders #1961

Merged
merged 1 commit into from Feb 28, 2018

Conversation

wch
Copy link
Collaborator

@wch wch commented Feb 28, 2018

This fixes #1600.

Test app:

library(shiny)

now <- Sys.time()
today <- Sys.Date()

ui <- function(request) {fluidPage(
  sliderInput("datetime", "Date-time",
    min = now, max = now + 10*3600, value = now + c(3, 4)*3600
  ),
  sliderInput("date", "Date",
    min = today, max = today + 10, value = today + 5
  ),
  verbatimTextOutput("values"),
  bookmarkButton()
)}

server <- function(input, output, server) {
  output$values <- renderText({
    paste(
      paste(input$datetime, collapse = ", "),
      input$date,
      sep = "\n"
    )
  })
}

shinyApp(ui, server, enableBookmarking = "url")

@wch wch added the review label Feb 28, 2018
@jcheng5 jcheng5 merged commit 133d301 into master Feb 28, 2018
@jcheng5 jcheng5 removed the review label Feb 28, 2018
@wch wch deleted the fix-date-sliders-bookmarking branch March 1, 2018 21:58
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

Successfully merging this pull request may close these issues.

Use dates/times in a sliderInput is not compatible with bookmarking
2 participants