You can just use filter or time_filter (as mentioned above) in your renderDataTable() function. NOTE: R is case sensitive and it is important that you pay close attention to function names (i.e. it is renderDataTable, dataTableOutput(), and dateRangeInput()) . Also, your server code needs to be in the form of a function. It would look like this:
ui<-mainpanel(
dateRangeInput(‘daterange’,start=sys.date(),-2, end=sys.date() +2),
dataTableOutput(‘table’)
)
server<- function(input, output){
output$table<-DT::renderDataTable({
dataset %>%
filter(date > input$daterange[1],
date < input$daterange[2])
})
}