Date modifier in Themes not working (Liquid/HTML)

Im trying to create my custom prefix as reference for Payment.

Goal: To include date as part of the ref. ex: PV0412-001

where 0412 taken from Date, and 001 from the payment ref. input box.

consider pvno has been assigned from Date, field.text:

<div style="font-weight: bold">{{ field.label }}</div>
<div style="margin-bottom: 10px">PV{{ pvno | date: "%d%m" }}-{{ field.text}}</div>

result: PV012-001

Looks like the output only shows 0 instead of 04.
i tested using %M, working by showing 4 which i need to prepend 0 to get 04.
this issue happen for 1 digit month(also when using %Y). working fine for 10,11,12.

anything i missed?

desktop software ver. 20.2.71


looks like bottom icon also not loading after this new update…maybe need to reinstall?

Let me make several points:

  • This is not a coding forum. Users are responsible for designing, executing, and debugging their own custom themes, or hiring someone qualified to do so for them if they do not have the skills themselves.
  • The theme view you showed is meant only to display the general appearance created by a theme, not any specific transaction. Do not expect that display to exactly match what your custom theme produces. You must look at actual transactions.
  • Your icon question is unrelated to Manager unless you modified the content of the software bundle.

Maybe you can prepend a zero and use the slice command to get the part you want.

already fix it.
but thanks.

Maybe you can tell how you did it so other users may benefit.

                    <td class="textEnd">
                    {% for field in fields %}
                    {% if field.label == "Date" %}
                    {% assign pv = field.text %}
                    {% endif %}
                    {% endfor %}
                    {% for field in fields %}
                    {% if field.label != "Reference" %}
                    <div style="font-weight: bold">{{ field.label }}</div>
                    <div style="margin-bottom: 10px">{{ field.text }}</div>
                    {% else %}
                    {% if title == "Payment" %}
                    <div style="font-weight: bold">{{ field.label }}</div>
                    <div style="margin-bottom: 10px">PV{{ pv | date: "%d" | prepend: "00" | slice: -2, 2 }}{{ pv | date: "%M" | prepend: "00" | slice: -2, 2 }}-{{ field.text | prepend: "000" | slice: -3, 3 }}</div>
                    {% else %}
                    <div style="font-weight: bold">{{ field.label }}</div>
                    <div style="margin-bottom: 10px">IV{{ pv | date: "%d" | prepend: "00" | slice: -2, 2 }}{{ pv | date: "%M" | prepend: "00" | slice: -2, 2 }}-{{ field.text | prepend: "000" | slice: -3, 3 }}</div>
                    {% endif %}
                    {% endif %}
                    {% endfor %}
                </td>

need at least basic programming to achieve this (for those interested to customize the view/position of their themes) since im using condition there.
in my case, im including ‘IV’ as prepend if it is a receipt. for payment, im using ‘PV’.

reason for multiple LOOP there because i cant directly access Date using bracket notation.
already reinstall still having this issue but icon at bottom toolbar already fix.