Home Forums Backend Issues (wp-admin) Time Picker field converting all values to AM


Time Picker field converting all values to AM

  • I am using a Time Pickers field, and whenever I enter a time value in it, it gets transformed to AM when saving.

    For exemple, upon loading the page, the field will display only ‘5:30’, no AM/PM, regardless of AM/PM. When choosing the value, the appropriate AM/PM will appear, and the value will become ‘5:30 PM’. Upon saving, it will revert back to ‘5:30’, but whenever I try show the value on the page (with get_field), it shows the AM value. It’s like AM/PM is not saved.

    Any clues?

  • Hi @brunocloutier
    Have you taken a look at your field settings? Specifically the output/input formats. What do you have there?

  • I have the standard settings, with time set to (example) 7:00 am. I switched it to show the 24h format and it works, but I can’t make AM/PM work. Weird.

  • Are you setting the format according to the JS format, not PHP? (They’re different in some aspects and I’ve made that myself a few times).

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.