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

Unspecified value for dateInput() and min/max parameter set breaks server side uiOutput() #3263

Open
trbailey326 opened this issue Jan 19, 2021 · 0 comments

Comments

@trbailey326
Copy link

This is related to #896. I wanted to have no initial dateInput() value AND set a min value. I have other dynamic UI elements in my code. When I set min with value = as.Date(NA), it breaks server side rendered UI elements. Below is a MWE:

library(shiny)

ui <- fluidPage(

    titlePanel("Test DateInput Bug"),

    sidebarLayout(
        
        sidebarPanel(
            
            dateInput("date", "Date Input", value = as.Date(NA), 
                      # This breaks all server side UI output for some reason...
                      min = Sys.Date(),
                      daysofweekdisabled = c(0, 6)),
            
            radioButtons("test", "Show Text Input", choices = c("No", "Yes"), selected = "No"),
            
            uiOutput("testText")
        ),
        
        mainPanel()
    )
)
server <- function(input, output) {
    output$testText <- renderUI ({
        if (input$test == "Yes") {
            textInput("test", "Testing if this is effected by dateInput() min and max parameters", "")
        }
    })
}
shinyApp(ui = ui, server = server)
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

1 participant