[HFE] EncounterDate Tag dateformat doesn't change in french locale

Hello Everyone,

We are using encounterdate tag in our html forms and we have figured out that it is showing the date-format from english locale even when the form is being viewed in french.

Please check the screenshot below. The format is shown as dd/mm/yyyy.

From a quick debugging we were able to figure out if we replace this line in DateWidget.java

sb.append(" (" + dateFormat().toPattern().toLowerCase() + ")");


sb.append(" (" + dateFormat().toLocalizedPattern().toLowerCase() + ")");

It whould work fine.

Will it be a good idea to make this change or do we see any backward compatibility issues with this?

Please let us know.

CC: @dkayiwa @mogoodrich @mksd @herbert24 @rrameshbtech @vasanth2019

1 Like

i think you can go on to create a ticket for this and we have it fixed

Thanks @herbert24 for your reply.

By mistake I created the card in FM2 project, could you please help me moving this to HFE project.


1 Like

Thanks @dkayiwa for moving the card to the right project.

I have raised a PR here (https://github.com/openmrs/openmrs-module-htmlformentry/pull/185)

I have assigned the card to myself however was not able to move it from Need Assessment. Could you please help with that.


1 Like

Thanks @dkayiwa,

Moved the card to Code Review (Initial).