In the past I have used a combination of dateInput and a slider to get date and hour for my shiny app. I was wondering if there is a better option available now as I need to col
I ran into the same problem, and I ended up making it a text field. I pre-populated the text field to show the users the proper format, and added checking (using try
to make sure the field was properly formatted before doing anything.
From UI.R
textInput("fromDatetime", "From:", value = "9999-99-99 99:99:99" )
And then in server.R
fromDTtry = try(as.POSIXct(fromDatetime))
if (!(is.POSIXct(fromDTtry))) {
return ("From date/time not formatted correctly")
} else {
... }
I hope this helps. Hopefully Shiny will get around to native date/time support soon.