title: How to set a dateRangeInput based on data?
body: <p>I am trying to set up a relatively basic shiny app, I have a data frame with a column of dates <code>(DF$Date)</code> and I want to :(1) set up the <code>dateRangeInput</code> to get the minimum and the maximum of <code>DF$Date</code> (2) the <code>tableOutput</code>should print only the dateRange choosen.
  Here's the code I'm using:</p>
  
  <p>UI.R</p>
  
  <pre><code>library(shiny)
  library(shinydashboard)
  library(plyr)
  library(reshape2)
  
  #library(data.table)
  
  shinyUI(pageWithSidebar(
    headerPanel("CSV Viewer"),
    sidebarPanel(
      fileInput('file1', 'Choose CSV File',
                accept=c('text/csv', 'text/comma-separated-values,text/plain', '.csv')),
      tags$hr(),
  
      checkboxGroupInput("inCheckboxGroup",
                         "Checkbox group input:",
                         choices = NULL
                         ),
      actionButton("oui","Affichage"),
      actionButton("non","Clear"),
      numericInput("act1", "afficher les dernieres lignes:",10),
  
      uiOutput("choose_columns"),
      uiOutput("date")
  
    ),
  
    mainPanel(
     uiOutput("dates"),
      tableOutput('contents'),
  
      verbatimTextOutput('mean')
  
    )
  ))
  </code></pre>
  
  <p>SERVER.UI</p>
  
  <pre><code>shinyServer(function(input, output,session) {
    dsnames &lt;- c()
    ######### essai date ###############
  
    ################### 
    output$dates &lt;- renderUI({
    inFile &lt;- input$file1
  
    if (is.null(inFile))
      return(NULL)
    dates &lt;- as.Date(data_set()$Date,origin="2002-10-01", format = "%d %b %y")
    minval &lt;- min(dates)
    maxval &lt;- max(dates)
    dateRangeInput('expDateRange', label = "Choose experiment time-frame:",
                   start = minval, end = maxval, 
                   min = minval, max = maxval,
                   separator = " - ", format = "yyyy-mm-dd",
                   language = 'cz', weekstart = 1)
  
  
  })##################################
  
  
    ####################################
    data_set &lt;- reactive({
      inFile &lt;- input$file1
  
      if (is.null(inFile))
        return(NULL)
  
      data_set&lt;-data.frame(tail(read.csv(inFile$datapath, header = TRUE, sep = ";", dec = ","), n=input$act1))
      data_set
    })
  
    ###########ici observe contents []###################
    observe({if(input$oui)
      output$contents &lt;- renderTable({
        inFile &lt;- input$file1
  
        if (is.null(inFile))
          return(NULL) 
       format( data_set()[, input$inCheckboxGroup], nsmall=5)
  
      })
    })
    observe(if(input$non) output$contents&lt;- renderTable(NULL))
    #############################################
    output$mean&lt;-renderPrint({
      inFile &lt;- input$file1
  
      if (is.null(inFile))
        return("choisissez le fichier et decocher la date")
      inFile &lt;- input$file1
  
      data&lt;- data_set()[, input$inCheckboxGroup]
      a&lt;-colMeans(data[,which(sapply(data, class) != "Date")])
     moyenne&lt;-round(a*100,5)
      data.frame(moyenne)
    })
  
  
      observe({
      dsnames &lt;- names(data_set())
      cb_options &lt;- list()
      cb_options[ dsnames] &lt;- dsnames
      updateCheckboxGroupInput(session, "inCheckboxGroup",
                               label = "Check Box Group",
                               choices = cb_options,
                               selected = cb_options)
  
    })
  
  
    output$choose_dataset &lt;- renderUI({
      selectInput("dataset", "Data set", as.list(data_sets))
    })
  
    # Check boxes
  
    output$choose_columns &lt;- renderUI({
      # If missing input, return to avoid error later in function
      if(is.null(input$data_set))
        return()
  
      # Get the data set with the appropriate name
  
      colnames &lt;- names(contents)
  
      # Create the checkboxes and select them all by default
  
       checkboxGroupInput("columns", "Choose columns", 
                          choices  = colnames,
                          selected = colnames)
  
    })
  
  
  })
  </code></pre>
  
  <p>the data I'm using :</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>Date          VL         s         d     performance
  
  28/12/2015  1082,71     3,67    0,0005  -0,0002
  04/01/2016  1081,78     3,67    0,0005  0.0007
  08/01/2016  1082,27     4,03    0,0031  0,0008
  15/01/2016  1082,76     4,06    0,0013  0,0009
  22/01/2016  1086,08     4,41    0,0042  0,0014
  29/01/2016  1087,5      4,58    0,0016  0,0015
  05/02/2016  1092,02     5,81    0,003   0,0016
  12/02/2016  1093,8      6,6     0,006   0,0021
  19/02/2016  1097,05      6      0,0016  0,0021
  26/02/2016  1103,63     5,02    0,0019  0,0021
  04/03/2016  1105,35     4,79    0,0024  0,0021
  11/03/2016  1107,45     3,36    0,0074  0,0025
  18/03/2016  1110,16     4,83    0,0112  0,0031
  </code></pre>
  
  <p>Any hint can be useful please I'm stuck. Thank you.</p>