View source: R/datetimeMaterialPicker.R
datetimeMaterialPickerInput | R Documentation |
A datetime picker for a Shiny UI.
datetimeMaterialPickerInput(
inputId,
label = NULL,
value = NULL,
disablePast = FALSE,
disableFuture = FALSE,
style = NULL
)
inputId |
the input slot that will be used to access the value |
label |
a label, a character string (HTML is not allowed), or
|
value |
initial value, either a |
disablePast |
logical, whether to disable past dates |
disableFuture |
logical, whether to disable future dates |
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(
datetimeMaterialPickerInput(
"dtmpicker",
label = "Appointment",
disablePast = TRUE
)
),
mainPanel(
verbatimTextOutput("dtmpicker")
)
)
)
server <- function(input, output){
output[["dtmpicker"]] <- renderPrint({
input[["dtmpicker"]]
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.