Date management in forms in version 7.8


#1

Hello.
I’m using a lot of embedded forms in my user tasks.
All those forms have a date field already populated by previous steps with a Date() object. The format YYYY-MM-DDTHH:mm:ss was showed on the form correctly.

In 7.7 I had no problems.
In 7.8 the date format showed is different (I didn’t change anything on angular date format though). This very format is not accepted.

The old format example : 2017-12-22T13:27:11.172
The new format (this is the new convention for camunda 7.8) is for example : 2017-12-22T13:27:11.172+0100
I have to delete the four digits at the end to complete my form.

Even if I’m going to modify the date-picker attribute in angular, the new format is not accepted.

Is there anything left to fix for the new date format in order to work with angular ?

Thanks.


#2

What you are seeing is the timezone information. This was introduced with the time zone support

https://blog.camunda.org/post/2017/06/camunda-bpm-780-alpha1-released/

You should be able to update your form configuration to handle the timezone info: https://docs.angularjs.org/api/ng/filter/date


#3

Thanks StepherOTT, but I can’t find any clue in those pages for my problem.

Maybe I’m missing something in the directives given in the camunda page:
(https://docs.camunda.org/manual/7.8/reference/embedded-forms/controls/date-inputs/).

If the date is already set to some value by the process, the date in the form will appears with the complete new format.

If the date is set by the date picker, the format will be established by the datepicker-popup format configuration. For example I can choose to have the format as dd/MM/YYYY. This is working, but only if I’m selecting the datepicker.

In either case the form completion will fail or disable ‘complete’ button unless the format of date is ‘YYYY-MM-DDTHH:mm:ss’.

Tests with a datepicker-popup = ‘dd/MM/yyyy’ :
dates left in the new format : ‘YYYY-MM-DDTHH:mm:ss SSSZ’ —> the complete button is disabled
dates in the format ‘dd/MM/YYYY’ or similar filled manually in the field —> the complete button is disabled
date in the format ‘dd/MM/YYYY’ or similar filled through date picker will throw an error during submit (Example Error Message : Value ‘15/01/2017’ is not of type Date)

Only dates with ‘YYYY-MM-DDTHH:mm:ss’ will pass.


#4

I have the same problem


#5

Did any one figure out what needs to be done? I have the same issue and even I specified datePattern=“yyyy-MM-dd’T’HH:mm:ss” in my embedded form(note I am not using date picker), I still see the date appearing like 2018-12-04T14:54:42.000-0500. Unless I remove the part -0500, the complete button remains disabled. I am using camunda docker image which I believe uses Camunda 7.10