Title: | A Datetime Range Picker Widget for Usage in 'Shiny' Applications |
Version: | 1.1.0 |
Description: | Provides a datetime range picker widget for usage in 'Shiny'. It creates a calendar allowing to select a start date and an end date as well as two fields allowing to select a start time and an end time. |
License: | GPL-3 |
URL: | https://github.com/stla/DateTimeRangePicker |
BugReports: | https://github.com/stla/DateTimeRangePicker/issues |
Imports: | htmltools, lubridate, reactR, shiny |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-09-02 15:56:14 UTC; SDL96354 |
Author: | Stéphane Laurent [aut, cre], Wojciech Maj [cph] (author of the 'React-DateTimeRange-Picker' library) |
Maintainer: | Stéphane Laurent <laurent_step@outlook.fr> |
Repository: | CRAN |
Date/Publication: | 2023-09-03 06:10:09 UTC |
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)
}
Update a datetime range picker input
Description
Change the values of a datetime range picker input.
Usage
updateDateTimeRangePickerInput(session, inputId, from, to)
Arguments
session |
the Shiny |
inputId |
the id of the datetime range picker widget to be updated |
from , to |
new values for the datetime range picker widget |
Value
No returned value, called for side effect.