How can I change this icon to something else, like a an icon that represents reset?
Asked
Active
Viewed 174 times
1 Answers
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
-
Is there noway to initialize the button with a new icon? because there is a slight lag before the desired icon is displayed. during the lag, the old icon is displayed – Bear Bile Farming is Torture Nov 17 '20 at 17:27
-
Currently no, but you can open an issue in GitHub repo, I'll look at it – Victorp Nov 18 '20 at 08:12