Display formated date

Hello,

I have formated a date but it’s in red.

Do you know why ?

Thank you

A data picker (obviously) is used for selected and holding a ‘Date’ value…

Therefore, if you assign ‘initial content’ to the datepicker, that initial content MUST be a Date.

Currently you’re setting the Initial Content to a ‘Text’ value - hence the error.

I don’t know exactly what you’re tyring to do, but if you remove the formatting from the expression in the initial content, you’ll have a Date value - so if that’s th
e value you’re trying to use for the initial content, that’s all you’re doing wrong (remember, formatting a Date turns it into a Text)

I just want to have a date format for Belgium.

At the moment, this is what I have :

8

But I need to have the date in this format : 17/04/2023

When displaying a Date you can format it however you like (if the pre-set formatting options don’t meet your needs, just use a Custom format).

In a datepicker element you can define the formatting for the displayed date with the ‘Date Format’ field.

image

As you’re using a Style on your Datepicker, you can define that in the Styles tab (just click ‘Edit style’), or you can detach the style, then edit the date format directly in the properties editor.

1 Like

Thank you !

1 Like