Invalid date value

Hi all
I have a process with start form field named “date”. When I start the process a date value for example (2019-03-29)(yyy-MM-dd) is set to that variable. After the start event there is a user task which should display the date variable from the start event, as the following xml:
<camunda:formField id=“date” label=“Date” type=“string” datePattern=“yyyy-MM-dd” defaultValue="${date}">
<camunda:constraint name=“readonly” />
When I use FormService.getTaskFormData(taskid);
I’ve got this exception:
org.camunda.bpm.engine.ProcessEngineException: invalid date value Fri Mar 29 00:00:00 EET 2019.
I think that exception is thrown because of “DateFormType” Class in org.camunda.bpm.engine.impl.form.type package because it treats the value as string with the default formatter:
public Object convertFormValueToModelValue(Object propertyValue) {
if (propertyValue==null || “”.equals(propertyValue)) {
return null;
try {
return dateFormat.parseObject(propertyValue.toString());
} catch (ParseException e) {
throw new ProcessEngineException("invalid date value "+propertyValue);
so, Is this a bug?, or I have a misunderstanding somewhere?
Best Regargs

@MATRIX81 camunda supports only ISO Date format “yyyy-MM-dd’T’HH:mm:ss”.

Refer this for more details,

@aravindhrs Thank you, but the type of variable date is date, so it is saved in database as date. but the function serviceForm.getTaskFormData(taskid) threw the exception when it try to parse the value in expression ${date}.
I solved that by changing the parameter type to string and start the process with formatting the date to string and parse it when needed using the same format.