Time Picker Display Format

Support General Time Picker Display FormatResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32915
    SolaceSolace
    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?

    #32928
    Long NguyenLong 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
    SolaceSolace
    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 NguyenLong 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://support.metabox.io/topic/support-policy/

    #33066
    SolaceSolace
    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 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.