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

updateDateInput #1179

Closed
gmeurice opened this issue May 2, 2016 · 4 comments
Closed

updateDateInput #1179

gmeurice opened this issue May 2, 2016 · 4 comments
Assignees

Comments

@gmeurice
Copy link

gmeurice commented May 2, 2016

I 'm facing a problem with "updateDateInput" :

for example, while trying to update my dateInput with the value "2016-04-02" :

updateDateInput(session, "date.ddn" , label = NULL, min=NULL, max=NULL, value="2016-04-02")

The display within the shiny application correspond to the "2016-04-01"

This bug doesn't exist in shiny 0.13.1 (which I'm using for developpement, on another device that run macosx Yosemite with R.3.2.2), but there, I'm trying to deploy my shiny app on a shiny 0.13.2, on macOSX leopard (R 3.2.1)

Thanks

@hamsternik
Copy link

If look at this more accurately, the problem applies only for numbers, from 1 to 9, getting from sliderInput. But, after setting number, more or equal than 10, this problem disappears.

I, actually, found this bug on R, ver. 3.2.4 & Shiny ver. 0.13.2

@hamsternik
Copy link

I'm using example from this shiny sources:

ui <- fluidPage(
sliderInput("controller", "Controller", 1, 30, 10),
dateInput("inDate", "Input date")
)
#'
server <- function(input, output, session) {
observe({
# We'll use the input$controller variable multiple times, so save it as x
# for convenience.
x <- input$controller
#'
updateDateInput(session, "inDate",
label = paste("Date label", x),
value = paste("2013-04-", x, sep=""),
min = paste("2013-04-", x-1, sep=""),
max = paste("2013-04-", x+1, sep="")
)
})
}
#'
shinyApp(ui, server)
}

@wch
Copy link
Collaborator

wch commented Jul 27, 2016

This sounds like it's related to #987.

@wch wch removed the common-themes label Aug 9, 2016
@jcheng5 jcheng5 added P1 labels Aug 9, 2016
@wch wch self-assigned this Aug 9, 2016
@jcheng5 jcheng5 unassigned wch Aug 9, 2016
@wch
Copy link
Collaborator

wch commented Aug 12, 2016

It looks like the problem was that the min string being sent was "2013-04-9" instead of "2013-04-09", and this probably confused the date parser in the client.

@wch wch added review and removed targeted labels Aug 12, 2016
@wch wch closed this as completed in 4b0ed3f Aug 13, 2016
@wch wch removed the review label Aug 13, 2016
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

No branches or pull requests

5 participants