shiny::dateRangeInput("date", "A Date")
twDateRangeInput(
"date", "A Date Range",
container_class = "CONTAINER", label_class = "LABEL",
input_class = "INPUT", sep_class = "SEP"
)
# basic full shiny example
library(shiny)
ui <- fluidPage(
use_tailwind(),
twDateRangeInput(
"date", "A Date",
# Apply tailwind classes
container_class = "w-48 m-4 p-2 border border-gray-200 rounded-md drop-shadow-md",
label_class = "font-mono text-gray-600",
input_class = "drop-shadow-lg text-gray-600 font-mono rounded-md border-amber-400",
sep_class = "bg-amber-600 text-white font-bold font-mono"
),
verbatimTextOutput("value")
)
server <- function(input, output) {
output$value <- renderText({
as.character(input$date)
})
}
if (interactive()) shiny::shinyApp(ui, server)
Run the code above in your browser using DataLab