We have DateTime Picker. We have date column. We have datetime column. We have time column.
Where is the time picker? That would be so useful and use the native time selector from the device.
We have DateTime Picker. We have date column. We have datetime column. We have time column.
Where is the time picker? That would be so useful and use the native time selector from the device.
As often as this comes up, I agree there should be something, but I always wonder what people expect in the back end. I don’t think it’s necessarily as plug and play as expected.
What kind of value should a time only picker write to the table?
A date column is always a full date and time underneath regardless if you use either a date picker or a datetime picker. Also, regardless of the formatting for the date column, its’s still a full date and time underneath. For a time picker to work with a date column, it needs to write a date as well. What date would that be? First day of unix time? First day of the existence of time? Today? Tomorrow? Any point in the future? Point being, there will be a date attached if a time only picker existed and it wrote to a date column. If people try to do math, filter, or sorting based on the datetime, they may get unexpected results not realizing that the date attached to that time might be 55 years ago, or might be stuck as of the day they entered that time.
Alternatively, a time picker could simply write the numeric decimal equivalent of a time to the table, which would make it a lot easier mathematically to add the time to a date that is defaulted to midnight.
Another alternative is to write the time as text and use a couple columns including the text to date column to convert it to a date type. Although, the only column I will ever trust to do any date manipulation is the math column (to many bugs with the other date related column out there).
What are the expected back end logistics beyond being able to pick only a time? I think that’s something that’s not always considered.
I think there would need to be a conscensus on what’s expected. Personally, since date should not be involved, I would prefer a time picker writing the decimal equivalent of time. Midnight would be 0, noon would be 0.5, etc. That way it’s easy to display in a duration column and it’s also easy to use it mathematically against a date type column.
I think the backend doesn’t really matter since the datetime column can do date and time. But there is a date picker, a datetime picker but not a time picker.
Oh ok I see what you mean by the time would be stuck in the first unix date…
Right. You can format a date column to show time only on the front end, but it’s still a datetime underneath. That’s the part that I think would bite people if they didn’t realize that.
Just trying to open up discussion from several people to understand what exactly they are expecting out of a time picker component. I think the result really depends on the use case.
The time picker could be compatible with text or number column to allow timestamp (time part) and duration column for same purpose.