The dateRangeInput on my shiny app used to work earlier but now the function always returns NULL for some reason. I am adding the necessary bits of code. Would be really helpful if someone figures out the problem.
your code is not really reproducible because I don't know what is:
min = min(data$lossDate),
max = max(data$featureOpen)
start = floor_date(max(data$featureOpen), unit = "month")
%m-% days(1) %m-% months(1),
end = floor_date(max(data$featureOpen), unit = "month")
getDataRange() is a reactive expression, thus you will end up with an error if it is not in a reactive context. You can use it either inside an observe or observeEvent. See below where I replace my observe by:
dateRange <- getDateRange()
It will trigger an error:
Error in .getReactiveEnvironment()$currentContext: Operation not allowed without an active reactive context. (You tried to do something that can only be done from inside a reactive expression or observer.)
Stack trace (innermost first):
45: .getReactiveEnvironment()$currentContext
44: .dependents$register
43: getDateRange
42: server [#26]
1: runApp
Besides, if I remove req(input$dateRangeSelect) from my observe then the dateRangeInput is NULL: