0

output$highlight_end_ui <- renderUI({ timeInput("end_high", "Highlight end", seconds = F)

I could just make a text input, but I like the interface provided by dateRangeInput.

I have tried to use the timeInput function, but it only highlights the time range.

Martinen
  • 21
  • 2
  • create reactive variable that uses the data from dateInput and timeInput input-variables for filtering data.. beware of timezone-issues!! – Wimpel Aug 17 '20 at 11:39
  • SO does not really work like that.. If you want code, hire someone that does the coding for you. On SO, you'll probably get answers when you provide your own minimal, reproducible data, and the code you got stuck on. – Wimpel Aug 17 '20 at 11:46
  • take a look here https://burgerga.shinyapps.io/shinyTimeExample/ for inspiration – Wimpel Aug 17 '20 at 11:47
  • Thanks - will remember. – Martinen Aug 17 '20 at 12:00
  • I've tried to use the example from the link, but is met with an error: "Error in as.POSIXlt.default: do not know how to convert 'x' to class “POSIXlt” Could it be because the package is not loaded correctly? I changed RenderText to RenderUI - can I do that? – Martinen Aug 17 '20 at 12:13
  • I have been looking at it now, and come up with this example: sliderInput("timeRange", label = "Time range", min = as.POSIXct("00:00",format = "%H:%M"), max = as.POSIXct("24:00",format = "%H:%M"), value = c(as.POSIXct("00:00",format = "%H:%M"), as.POSIXct("24:00",format = "%H:%M"))), actionButton("update", "Update range") ) ))) But i cannot get rid of the date format - it still shows me the current day. I want it to show only time. – Martinen Aug 17 '20 at 12:26
  • @Wimpel Regarding your first comment: should I use the DaterangeInput as the reactive variable? – Martinen Aug 17 '20 at 12:48
  • @Martinen as Wimpel said, you should provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), it will be much easier to help you with that – bretauv Aug 20 '20 at 18:50

0 Answers0