airDatepickerInput 的图标如何

How can the icon of airDatepickerInput

如何将此图标更改为其他图标,例如代表重置的图标?

这个按钮实际上是一个 actionButton 和 inputId <ID>_button,所以更改图标最简单的方法是在服务器端更新按钮:

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)