Hi,
as Toolset miss a "Time" custom field, which is the better way to store time values?
Please notice that:
- I would need to display this time value as 3:00pm for some customers but as 15:00 for others.
- Customers will need a dropdown front-end to select these values, again as 3:00pm or 15:00
- I will use this values in Views custom filters to query related posts.
Last but not least: why there's no "Time" fields ? 😉
Thanks
Best
Hi, there is currently not a built-in way to accomplish this in Types custom fields. There is currently a date and time field, but not a time-only field. You would have to build something like this in custom code. There is currently a feature request in place to add a time field, but I do not have a timeline for delivery of this new feature.
The best way I can think of to accomplish this in the current system is to use a single "select" type custom field, and pre-define all the options like this:
Display Text: 1:00am / 01:00
Value: 1.0
Display Text: 1:15am / 01:15
Value: 1.25
Display Text: 1:30am / 01:30
Value: 1.5
...and so on...
This would allow you to create custom search filters that correspond to the different time values.
Hi Christian,
not the optimal solution, but I guess there's no other chance...
Thanks for your suggestion.
Best
I will assign this ticket to Beda, who handles feature requests. This way he can add your vote to the new feature request for a separate Time Field.
Time fields are filed as a feature request, but I have no ETA on these.
I added your voice to the request.
Any news on time fields?
I would have thought that "time" was one of the most common field types.
Any updates on this. It's been more than 1 year.
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/ would take too long to fill out; there's no time. It's time to add a time field.
Looking forward to this feature as well...