Skip to content

trafficonese/perioddaterangepicker

Repository files navigation

perioddaterangepicker

Lifecycle: maturing R build status Codecov test coverage

Custom Shiny input binding for a Date Range Picker.

Installation

# install.packages("remotes")
remotes::install_github("trafficonese/perioddaterangepicker")

Example

A basic example of a Date Range Picker:

library(shiny)
library(perioddaterangepicker)

## UI ##########################
ui <- fluidPage(
  perioddaterangepicker(
    inputId = "daterange",
    label = "Pick a Date",
    start = Sys.Date() - 30, end = Sys.Date(),
    style = "width:100%; border-radius:4px",
    icon = icon("calendar")
  ),
  verbatimTextOutput("print")
)

## SERVER ##########################
server <- function(input, output, session) {
  output$print <- renderPrint({
    req(input$daterange)
    input$daterange
  })
}

shinyApp(ui, server)

Further examples are in /inst/examples/

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published