Meta Box
Support › MB Views › Time format for all Time fieldsResolved
Hi, In MB Views, I want to set time format 1 time for all the Time fields output. I try this but it didn't work:
{% set time_format = 'H:i' %} {{ clone.hours_1 | date( '{{ time_format }}' ) }} {{ clone.hours_2 | date( '{{ time_format }}' ) }}
As a newbie, I don't know what is wrong. Please help! Thank you!
Hi,
For the cloneable field, you should use the for loop to display the value
for
{% set time_format = 'H:i' %} {% for clone in post.field_id %} {{ clone | date( time_format ) }} <br> {% endfor %}
Let me know how it goes.
Thank a lot Long Nguyen! It works as charm!