Skip to content

Instantly share code, notes, and snippets.

@nutterb
Created January 31, 2016 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nutterb/df916a0b58e049fd8e74 to your computer and use it in GitHub Desktop.
Save nutterb/df916a0b58e049fd8e74 to your computer and use it in GitHub Desktop.
dateInput save as NULL
library(shiny)
ui <- shinyUI(
fluidPage(
dateInput(inputId = "date",
label = "Signature Date",
value = ''),
actionButton(inputId = "save_signature",
label = "Print Signature"),
verbatimTextOutput("date_value"),
verbatimTextOutput("signature")
)
)
server <- shinyServer(function(input, output, session){
output$user_name <- renderText({ input$user_name })
output$date_value <- renderText({ input$date })
sign_date <- eventReactive(input$save_signature,
{
req(input$date)
input$date
})
output$signature <- renderText({ sign_date() })
})
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment