Closed outline4 closed 5 months ago
Hi @outline4,
Sorry again for the delays...
This is a limitation that we worked around in other areas where you can change event.startDate.format("l, F j, Y g:ia")
to event.startDateLocalized|date("l, F j, Y g:ia")
and it will resolve the issue. However, it seems the special Localized
version is not available for selectDate
.
I've noted this to see if we can get a quick update for this done. 🙂
Once PR is approved, merged and new version released, you will be able to do the following:
{% for selectDate in event.selectDatesAsDates %}
{{ selectDate.format('l, F j, Y') }}
{% endfor %}
{% for selectDate in event.selectDatesAsDatesLocalized %}
{{ selectDate|date('l, F j, Y') }}
{% endfor %}
{% for exception in event.exceptions %}
{{ exception.date.format('l, F j, Y') }}
{% endfor %}
{% for exception in event.exceptionsLocalized %}
{{ exception.date|date('l, F j, Y') }}
{% endfor %}
Describe the bug or issue you're experiencing
When changing
.format('')
to|date('')
it will shift the dates one day.I need to change it to a date filter in order that the dates will display in german.
Steps to reproduce
In the frontend form I cannot change the date to a localized date:
If I change
{{ selectDate.format('D. d. F Y') }}
to{{ selectDate|date('D d. F Y') }}
it will shift the dates one day.How can I achieve what I want to do?
Craft & Plugin Info (please complete the following information):