Hi,
I have a form field of Date type in a Start event and I give a default value
However when I run the process I get “invalid date value 2018-05-08T14:04:45” error.
What is wrong in my syntax?
Thanks!
Hi,
I have a form field of Date type in a Start event and I give a default value
However when I run the process I get “invalid date value 2018-05-08T14:04:45” error.
What is wrong in my syntax?
Thanks!
Hi @kontrag,
You need to specify the datePattern="yyyy-MM-dd'T'HH:mm:ss"
attribute to your formField.
If you don’t provide the datePattern
, the default pattern dd/MM/yyyy
is taken into account and the engine is not able to parse the provide date, which results in “invalid date value 2018-05-08T14:04:45” error.
Hope it helps.
Best regards,
Yana
Hi @yana.vasileva,
Where do yo specify the pattern?
In validation contraints?
I tried Name=datePattern
Config=‘yyyy-MM-dd’T’HH:mm:ss’
but it’s not correct when deploying.
Thanks,
Kostas
Hi Kostas,
You need to add the attribute in the xml by edit it like this:
<camunda:formData>
<camunda:formField id="orderDate" label="Date" type="date" datePattern="yyyy-MM-dd'T'HH:mm:ss" defaultValue="2018-05-08T12:12:45" />
</camunda:formData>
Best regards,
Yana