Roman
1
Hi, I am trying to show published date with time in blueprint. All works fine till minutes. Is there some mistake in this code?
date:
type: date
text: '{{ page.modified("Y-m-d-H-i") }}'
dateInputFormat: 'YYYY-MM-DD-HH-i'
dateOutputFormat: 'DD-MM, HH:i'
with this code I just get empty field:
If I change minutes (i) to anything else or erase (i), it works.
I’m not even aware of these properties?
Roman
3
Ah, I see, maybe they are custom, I am using module https://github.com/sylvainjule/kirby-pagetable
Roman
4
Seems figured out the problem. It’s using different format: https://date-fns.org/v2.0.0-alpha.7/docs/parse, where minutes are “mm” or “m”
this way it works:
text: '{{ page.modified("Y-m-d-H-i") }}'
dateInputFormat: 'YYYY-MM-DD-HH-mm'
dateOutputFormat: 'DD-MM, HH:mm'