Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Amir Helzer

    (@amirhelzer)

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

    Thread Starter blankartist

    (@blankartist)

    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.

    msteel

    (@msteelnapcocom)

    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.

    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.

    Plugin Author Amir Helzer

    (@amirhelzer)

    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?

    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. 🙁

    Plugin Author Amir Helzer

    (@amirhelzer)

    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/

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] Feature Suggestion: Time to Custom’ is closed to new replies.