WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Feature Suggestion: Time to Custom (9 posts)

  1. blankartist
    Member
    Posted 1 year ago #

    Hi - can you add "time" with validation as a custom field option?

    Many thanks!

    http://wordpress.org/extend/plugins/types/

  2. AmirHelzer
    Member
    Plugin Author

    Posted 1 year ago #

    There's already a time field in Types. It lets you enter times using text input or datepicker. Have you tried that?

  3. blankartist
    Member
    Posted 1 year ago #

    I don't see "Time" as an available field. I'm only seeing "Date" as an available field. Date doesn't work for time, it has a date picker, and when you enter a time, it errors on validation.

    If I use Single Line as the custom field, and I can't see how I would validate that a proper time was entered.

  4. msteel
    Member
    Posted 1 year ago #

    I'm also hoping for a time picker, but don't see it either. I see the file 'types/includes/fields/time.php', but I don't see it appear as an option.

    I can pick the code apart a little when I get a chance, but figured I'd try the forum first.

    Thanks!

    p.s. this is a fantastic plugin.

  5. Curtiss Grymala
    Member
    Posted 1 year ago #

    I'm not able to find the "Time" option for the custom fields, either. I'm using WordPress 3.4.2 and Types v1.0.4. I would love to see this option turned on within the plugin. Thanks.

  6. AmirHelzer
    Member
    Plugin Author

    Posted 1 year ago #

    You're right. We only have Date and not Time. So, you're looking for something that lets you select both the date and time?

    When you do this, you should also probably check for timezone and adjust time according to that.

    What are you thinking about a Time field? How are you going to use it?

  7. krowland08
    Member
    Posted 1 year ago #

    I had a small discussion with the developer of Types and he stated that the DATE is indeed stored as a DATETIME variable, but the time is set to 00:00 for now. It looks like the storage infrastructure is ready to add the time portion of this variable, but the front end interface needs to be added.

    The tricky part is that you are entering both a Date field and some Time fields (Hours, Minutes, Seconds, AM/PM), but then need to be combined into ONE stored variable in the database.

    And you might want to have just have a TIME value, that is not tied to any date. Like just wanting to enter the time of the day.

    Some old school systems force you to enter the text of DATETIME in a one-line field, ie. "09-25-2012 13:05:00 PST" and you'd have to get it exactly right or it fails. Kind of like setting the system clock on a Unix system. :-( So a much better GUI front-end needs to do this for you.

    Kind of need a Date only, Time Only and DateTIme fields. For now you could use a text box and let the user type in 12:34 or two Numeric fields, Hours and Minutes as you see fit for your display purposes, but it wouldn't be error checked.

    I too hope that time gets added to Date in the near future. It would be easier to handle AM/PM, Timezone, and error checking.

    Maybe the more people who request this can encourage the developers!

    UPDATE: Come to think of it, should probably mimic the WordPress Publish Date and Time entry boxes style. But then there is no way to change the TimeZone and you always work in 24-hour time. :-(

  8. AmirHelzer
    Member
    Plugin Author

    Posted 1 year ago #

    Quick update. The 'date' field in Types actually stores 'time' (in seconds). We're making a small change in Types 1.0.5, which will let you input either date, like it's now, or full time, like you're asking.

    When you create a Time/date field, you'll choose if you want to input the data or full time. If it's time, you'll have both the date, hour and minute. I don't see a point in asking for seconds too.

    This should take care of the time input without causing redundancy.

    As it's going into the code, I'm making it as resolved. We'll post about a test version in our blog, as soon as it's ready:
    http://wp-types.com/category/blog/

  9. saracup
    Member
    Posted 1 year ago #

    Is this time entry feature there yet? Would love to use it!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic