Created
January 31, 2016 01:36
-
-
Save nutterb/df916a0b58e049fd8e74 to your computer and use it in GitHub Desktop.
dateInput save as NULL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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