Changing the language of "to" in Shiny's dateRangeInput

Viewed 148

I'm very new to shiny or any dashboard related development for that matter. My question is kind of specific and only tackles how the data is displayed and does not talk about internal logic of the app.

I applied language = "ru" option inside dateRangeInput and it changed how the text within date selector is rendred but it did not change the "to" bettween the two datefields. I understand that it might sound like I'm nitpicking but these little details matter for what I'm trying to do. Screenshow to ilustrate the problem.

Thanks in advance!

enter image description here

ui <- fluidPage(
  titlePanel("Калькулятор остатков"),
  sidebarLayout(
    sidebarPanel(
      dateRangeInput("dates","Временной диапазон",start = "2020-07-01", 
                                                  end = "2020-09-01", language = "ru"),
    ),
    mainPanel()
  )
)

server <- function(input, output, session) {
}

shinyApp(ui, server)
1 Answers

The function dataRangeInput has an seperator- argument, the default is to. You may change this to your desired word.

ui <- fluidPage(
  titlePanel("Калькулятор остатков"),
  sidebarLayout(
    sidebarPanel(
      dateRangeInput("dates",
                     "Временной диапазон",
                     start = "2020-07-01", 
                     end = "2020-09-01", 
                     language = "ru",
                     separator = " до "),
    ),
    mainPanel()
  )
)

server <- function(input, output, session) {
}

shinyApp(ui, server)

Related