# NOT RUN {
if (interactive()) {
# examples of different options to select dates:
demoAirDatepicker("datepicker")
# select month(s)
demoAirDatepicker("months")
# select year(s)
demoAirDatepicker("years")
# select date and time
demoAirDatepicker("timepicker")
# You can select multiple dates :
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
airDatepickerInput(
inputId = "multiple",
label = "Select multiple dates:",
placeholder = "You can pick 5 dates",
multiple = 5, clearButton = TRUE
),
verbatimTextOutput("res")
)
server <- function(input, output, session) {
output$res <- renderPrint(input$multiple)
}
shinyApp(ui, server)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab