Search code examples
shinyradix

Using date in Shiny valueBox


How can I show the current date in the subtitle of a Shiny valueBox?

output$approvalBox <- renderValueBox({
        valueBox("95",
                 "Number of School Days as of `r Sys.Date()`

Solution

  • You can use paste()

    valueBox(value = "95",
             subtitle = paste("Number of School Days as of", Sys.Date()))