View source: R/datetimePicker.R
datetimePickerInput | R Documentation |
A datetime picker for a Shiny UI.
datetimePickerInput(inputId, value = NULL, style = NULL)
inputId |
the input slot that will be used to access the value |
value |
initial value, either a |
style |
inline CSS for the container |
A shiny.tag
object that can be included in a Shiny UI.
if(interactive()){
library(shinyDatetimePickers)
library(shiny)
ui <- fluidPage(
br(),
sidebarLayout(
sidebarPanel(
tags$fieldset(
tags$legend("Click to change time"),
datetimePickerInput(
"dtpicker",
style =
"font-family: Montserrat, 'Segoe UI', Tahoma, sans-serif;"
)
)
),
mainPanel(
verbatimTextOutput("dtpicker")
)
)
)
server <- function(input, output){
output[["dtpicker"]] <- renderPrint({
input[["dtpicker"]]
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.