DateTimeRangePickerInput {DateTimeRangePicker} | R Documentation |
Datetime range picker
Description
A datetime range picker widget for a Shiny UI.
Usage
DateTimeRangePickerInput(inputId, from = NULL, to = NULL, style = NULL)
Arguments
inputId |
the input slot that will be used to access the values |
from , to |
initial values, either |
style |
inline CSS for the container |
Value
An input element that can be included in a Shiny UI definition.
This is a shiny.tag.list
object.
Examples
library(DateTimeRangePicker)
library(shiny)
ui <- fluidPage(
br(),
sidebarLayout(
sidebarPanel(
width = 5,
tags$fieldset(
tags$legend("Click to change time"),
DateTimeRangePickerInput(
"dtrpicker",
style = paste0(
"background-color: chartreuse; ",
"box-shadow: 0 30px 40px 0 rgba(16, 36, 94, 0.2);"
)
)
)
),
mainPanel(
width = 7,
verbatimTextOutput("dtrpicker")
)
)
)
server <- function(input, output){
output[["dtrpicker"]] <- renderPrint({
input[["dtrpicker"]]
})
}
if(interactive()){
shinyApp(ui, server)
}
[Package DateTimeRangePicker version 1.1.0 Index]