Hi all,
Can anyone please help me in if I can use the below condition logic. Because, first 2 conditions are correct, but when I execute any of the other 2, the app closes
ui.R
dateRangeInput("Date","",start = '', end = '',format = "yyyy-mm-dd",separator = "-"))
selectInput("Tic","",choices = c("ALL",as.character(ticker$Ticker)),selected = "ALL")
actionButton("Submit","Submit")
server.R
observeEvent(input$Submit,{
if(input$Tic != "ALL" && !is.null(input$Date)){
### below is the sample code I use to render filter. This is for your reference
(input$Tic ,input$Date[1], ,input$Date[2])
}
else if(input$Tic == "ALL"){
('ALL', '01/01/2018', '02/01/2018')
}
else if(input$Tic == "ALL" && !is.null(input$Date)){
('ALL', input$Date[1], input$Date[2])
}
else if (!is.null(input$Date)){
(input$Tic,'01/01/2018', '02/01/2018')
}