title: r and shiny: reactive on dates
body: <p>I have a problem on building connection between the daterange input and the date information from my df. Here is how my df looks like:</p>
  
  <pre><code>df &lt;- data.frame(x = c("a", "a", "b", "b", "b"), y = c("2016-01-01", "2016-02-04", "2016-03-05", "2016-01-01", "2016-04-06"))
  </code></pre>
  
  <p>here is my code:</p>
  
  <h3>ui.R</h3>
  
  <pre><code>library(shiny)
  
  shinyUI(fluidPage(
  
    sliderInput("date_range", 
                "Purchase Date Range:", 
                min = as.Date("2015-01-20"), max = Sys.Date(), 
                value = c(as.Date("2016-02-25"), Sys.Date())
    )
  ),
  mainPanel(
  
    tableOutput(
      "view"))
    )
  ))
  </code></pre>
  
  <h3>server.R</h3>
  
  <pre><code>library(shiny)
  
  shinyServer(function(input, output) {
  
  
  })
  
  
  output$view &lt;- renderTable({head(datasetInput())})
  
  })
  </code></pre>
  
  <p>Just don't know how to write the input in server so that y can be connected to the date_range selection. Can anyone help me with this? Thank you!</p>