Change language in shinyWidgets::updateAirDateInput [R]

13 Views Asked by At

I am building a multilingual app with R Shiny and would like to change the language of the shinyWidgets::airDatepickerInput when clicking on a button. I have tried several options following the Air Datepicker documentation, so far unsuccessfully. Below a reproducible example:

library(shiny); library(shinyWidgets)

ui <- fluidPage(
airDatepickerInput("date", "Date in English"),
actionButton("button", "Button")
)
server <- function(input, output) {
observeEvent(input$button, {
  updateAirDateInput("date", 
                     label="Date in Russian", 
                     options=list(view="years",
                                  language="ru"),
                     session = getDefaultReactiveDomain())
})
}

# Run the application 
shinyApp(ui = ui, server = server)

Any suggestion on how to solve this issue?

0

There are 0 best solutions below