title: Using dynamic dates in Shiny dateRangeInput
body: <p>I am trying to set up a relatively basic shiny app, allowing users to view a bar graph of events over time, with the ability of the user to control the date range in question. However, I'm also trying to make sure that the user cannot select date ranges outside of the minimum and maximum ranges available in the data set in question.</p>
  
  <p>My server.R: </p>
  
  <pre><code>shinyServer(function(input, output){
    data&lt;-read.csv('CMI-app/data/AnalysisData_FIWI_2014_NESH06Aug14.csv')
    notesBySite&lt;-initialProcessing(data)
    notesBySite_Day&lt;-notesBySite_Day(data)
    output$dates&lt;-renderTable(cbind(min(notesBySite_Day$Date), max(notesBySite_Day$Date)))
  })
  </code></pre>
  
  <p>initialProcessing and notesBySite_Day are functions to subset out particular parts of the larger csv, and are used in helpers.R, and have been tested and shown to work. I can post them but don't think it's really necessary.</p>
  
  <p>my UI.R</p>
  
  <pre><code>shinyUI(fluidPage(
    titlePanel("Conservation Metrics, Inc."),
  
    sidebarLayout(
      sidebarPanel(
        helpText(c("Please Choose a Date Range between", dates[1], "and", dates[2])),
        dateRangeInput("date",
                       label="Date Range of Interest",
                       weekstart=1)
        ),
  
  mainPanel(
    h1("Test Main Panel"))
  </code></pre>
  
  <p>)
    ))</p>
  
  <p>I have also tried replacing the dateRangeInput line with:</p>
  
  <pre><code>      dateRangeInput("date",
                       label="Date Range of Interest",
                       min=dates[1],
                       max=dates[2],
                       weekstart=1)
  </code></pre>
  
  <p>But this has not worked, either. In both cases,  an object "dates" not found error occurs. Am I totally barking up the wrong tree in trying to include this functionality? I could very easily go into the dataset and manually change the min and max permissible dates, but I want to use this as the framework for a broader app that will enable the user to process a number of different datasets. </p>