Custom Fields
Re-Envisioned
Support General Time Picker Display Format

  • Creator
    Topic
  • #32915
    Resolved Solace
    Participant

    Hi there, I used the migrator tool from ACF to Meta Box and having issues with the time picker option. With ACF there are options for Display Format, such as "g:i a" but with Meta Box I do not see that option. Where can I set the time to be:

    a) 12 hour format
    b) add PM or AM, based on the time?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #32928
    Long Nguyen
    Moderator

    Hi,

    If you are using the Builder, you can use the option "Time picker options" to set the time format. Screenshot https://share.getcloudapp.com/RBuy71Rl

    Or using the code

    'fields' => [
      [
        'name'       => __( 'Time Picker', 'your-text-domain' ),
        'id'         => 'time_picker',
        'type'       => 'time',
        'js_options' => [
          'timeFormat' => 'hh:mm TT',
        ],
      ],
    ],

    Refer to the documentation https://docs.metabox.io/fields/time/
    https://trentrichardson.com/examples/timepicker/

    #32952
    Solace
    Participant

    Hi Long, I did see this article in another place and tried it but for some reason the time still renders as 24 hour format without am/pm. I'm using Oxygen Builder, am I missing a step?

    #32953
    Long Nguyen
    Moderator

    Hi,

    In case of using Oxygen Builder, please reach to them if you have any issues with installation, configuration, compatibility, or usage.
    Refer to our support policy https://metabox.io/support/topic/support-policy/

    #33066
    Solace
    Participant

    Hi again Long, I reached out to Oxygen and after going back and forth figured out the issue. And it may be helpful to include this in the ACF migration tool documentation. Basically when the migration was finished the time values did not get corrected so I had to go in to each item and manually re-select the time from the time picker and then it worked. Appreciate your help! Feel free to close this ticket.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.