shinyWidgets
shinyWidgets copied to clipboard
airdatepicker with time dose not show time on the 1st of the month at 12:00 am
Hi Victor,
found a bit strange behavior on the date and time picker: the 1st of each month at 00:00:00 the time will not be shown on the output for some reason. Reproducable on demoAirDatepicker("timepicker") if you just select the 1st of April lets say and set time to 12:00 am, the text output will only show date. is this behaviour intentional? if yes would you have a thought on how to circumvent it and get the time also displayed?
thanks,
Andras
the time shows on the picker itself but not on the text output below where you print the selection...
Hello,
The input value is of class POSIXt
, it's the print method that don't display hours/minutes/seconds for midnight, you can try in your console:
as.POSIXct("2020-04-01 00:00:00")
# [1] "2020-04-01 CEST"
as.POSIXct("2020-04-01 00:00:01")
# [1] "2020-04-01 00:00:01 CEST"
lubridate::hour(as.POSIXct("2020-04-01 00:00:00"))
# [1] 0
Victor
I faced this issue in a different package. Possibly related https://stackoverflow.com/questions/76723008/cut-datetime-dropping-timestamp-in-windows-but-not-in-ubuntu