0

enter image description here

How can I change this icon to something else, like a an icon that represents reset?

1 Answers1

2

This button is actually an actionButton with inputId <ID>_button, so the easiest way to change the icon is to update button server-side:

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  airDatepickerInput(
    inputId = "mydate",
    label = "Select a dates"
  ),
  verbatimTextOutput("res")
)

server <- function(input, output, session) {
  
  updateActionButton(session, "mydate_button", icon = icon("remove"))
  
  output$res <- renderPrint(input$mydate)
}

shinyApp(ui, server)
Victorp
  • 13,636
  • 2
  • 51
  • 55