Quantcast
Viewing all articles
Browse latest Browse all 205330

Shiny - todaybutton won't work in airdatepickerinput

I'm having some trouble getting the todaybutton in the shinywidget airdatepickerinput to work.

Below you will find a simple example.

Ideally the value of the airdatepicker will be set to Sys.time() when the todaybutton is clicked regardless of the current value. Hope someone can help.

ui <- fluidPage(
  airDatepickerInput(
    inputId = "DateRange",
    value = Sys.time(),
    todayButton = T
  ),
  verbatimTextOutput("res_date")
)

server <- function(input, output, session) {
  output$res_date <- renderPrint(input$DateRange)
}

shinyApp(ui, server)



Viewing all articles
Browse latest Browse all 205330

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>