Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template filters not working for date/time in confirmation #4883

Open
LaurensBurger opened this issue Dec 3, 2024 · 3 comments
Open

template filters not working for date/time in confirmation #4883

LaurensBurger opened this issue Dec 3, 2024 · 3 comments
Labels
bug Something isn't working topic: gebruik variabelen

Comments

@LaurensBurger
Copy link
Collaborator

LaurensBurger commented Dec 3, 2024

Product versie / Product version

2.7.x - 2.8.x

Customer reference

dewol/hogev: 29

Omschrijf het probleem / Describe the bug

it's impossible to use a date with a filter to provide a local/readable date in the confirmation page and mail:

today: {{ today|date:"d/m/Y" }}
datefromform: {{ datum|date:"d/m/Y" }}

results in:
image
image

i expect the same result in both cases since both "today" and "datum" are dates.
right now the only way to show the dates form a form variable is: YYYY/MM/DD

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

Screen resolution

None

Device

None

OS

None

Browser

No response

@LaurensBurger LaurensBurger added bug Something isn't working triage Issue needs to be validated. Remove this label if the issue considered valid. labels Dec 3, 2024
@sergei-maertens
Copy link
Member

Related to #2324 - this is because formio component values are not actual datetime objects, they're strings.

@joeribekker
Copy link
Contributor

Refinement: This requires us to add typing information (ie. convert everything to Python types) so we can do template operations on it. However, JSON-logic then again doesnt understand Python types...

Fixing this properly will take a significant amount of time (read weeks/months).

@joeribekker joeribekker added topic: gebruik variabelen and removed triage Issue needs to be validated. Remove this label if the issue considered valid. labels Dec 9, 2024
@joeribekker
Copy link
Contributor

We can only pick this up with proper funding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic: gebruik variabelen
Projects
None yet
Development

No branches or pull requests

3 participants