Skip Navigation

[Resolved] Time field

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 10 replies, has 7 voices.

Last updated by bonittoD 5 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#905576

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

#905768

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.

#905858

Hi Christian,

not the optimal solution, but I guess there's no other chance...

Thanks for your suggestion.

Best

#906154

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.

#906155

Time fields are filed as a feature request, but I have no ETA on these.

I added your voice to the request.

#906157

Perfect, thanks!

#945674

Any news on time fields?

I would have thought that "time" was one of the most common field types.

#1265349

Any updates on this. It's been more than 1 year.

#1265351
#1712157

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.

#1716403

Looking forward to this feature as well...