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)