cancel
Showing results for 
Search instead for 
Did you mean: 

Configurable Date Patterns?

ryanj1
Champ in-the-making
Champ in-the-making
The default date pattern is hard coded in the org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl class within the "initFormTypes()" method. As there are situations where it would be beneficial to be able to change the default date pattern (from "dd/MM/yyyy") without having to sub type that class and override that method, can we add a protected member variable "datePattern" to the class and have the "initFormTypes()" method reference that member variable for the pattern instead of having it hard coded?

I'd be happy to make the modification and create a pull request. My plan would be to check for a value; if not specified (null) or invalid, I would default to the existing "dd/MM/yyyy".

Please let me know your thoughts.
7 REPLIES 7

trademak
Star Contributor
Star Contributor
Hi Ryan,

Do you mean that you would like to define the default date format instead of defining a datePattern for every date formProperty?

Best regards,

ryanj1
Champ in-the-making
Champ in-the-making
Right. Though users obviously can utilize their desired datePattern in every formProperty to utilize whatever date format they desire, it could get onerous having to define that for every date form element in every process model in their systems. Thus, I think it would be preferred to have this be configurable, and it would be easy to add this functionality.

jbarrez
Star Contributor
Star Contributor
Sounds good to me. I have nothing against having a default built in, makes sense!

b_schnarr
Champ in-the-making
Champ in-the-making
This would be very helpful. Is this possible in the meantime?

trademak
Star Contributor
Star Contributor
No, this is not added to the process engine configuration in the meantime.

Best regards,

molikas
Champ in-the-making
Champ in-the-making
Is this still expected to be developed, is there a ticket for tracking?

Thank you in advance.

trademak
Star Contributor
Star Contributor
I'm not aware of a JIRA issue, so if you would like to see it being address please raise one.

Best regards,