Error when setting the Date of Birth

I’ve been doing some investigation and found that my locale on the AWS server was set to:

$ locale
LANG=C.UTF-8

I changed the locale it to en_GB and en_CA but it didn’t help. Currently, my locale is set to:

$ locale
LANG=en_CA.utf8
LANGUAGE=
LC_CTYPE="en_CA.utf8"
LC_NUMERIC="en_CA.utf8"
LC_TIME="en_CA.utf8"
LC_COLLATE="en_CA.utf8"
LC_MONETARY="en_CA.utf8"
LC_MESSAGES="en_CA.utf8"
LC_PAPER="en_CA.utf8"
LC_NAME="en_CA.utf8"
LC_ADDRESS="en_CA.utf8"
LC_TELEPHONE="en_CA.utf8"
LC_MEASUREMENT="en_CA.utf8"
LC_IDENTIFICATION="en_CA.utf8"
LC_ALL=

In your Birthdate field, after the date picker drop down closes, can you change the year from 19 to 2019 by directly typing into that text box and see if it works?

When I try to type in the year (see below):

I get a different Error:

Screenshot%20from%202019-11-06%2008-33-46

On the same screen/page or a different one?

It is on a different screen.

What is the url of that screen?

Yes, here is the URL of the error screen:

http://ec2-63-***-***.eu-west-1.compute.amazonaws.com:8080/openmrs/admin/person/addPerson.htm?addName=Test+Patient&addBirthdate=03%2F11%2F1980&addAge=&addGender=M&personType=patient&viewType=shortEdit

When you view your page source, what value is assigned to the js variable? jsDateFormat

var jsDateFormat = 'dd/mm/y';
var jsTimeFormat = 'hh:mm';
var jsLocale = 'en_GB'

And how about on your local instance?

On my local machine:

			var jsDateFormat = 'dd/mm/yyyy';
			var jsTimeFormat = 'hh:mm';
			var jsLocale = 'en_GB';

Is there any reason why you are using the legacyui instead of the new one like this? https://demo.openmrs.org

No reason, how can I switch to the new one? Can I just install it as an OMOD module? I installed OpenMRS UI Framework 3.15.0 but not sure how to switch from LegacyUI.

Just install the reference application https://openmrs.org/download/

I have made some changes to the code of openmrs-core to test a new Audit functionality. So the reference application won’t have my changes.

Can’t you put your changes in a module?

Yes, I can try that. My changes were just for a quick demo so didn’t want to invest too much time with creating OMODs.

Still struggling with the locales on AWS. However, I noticed that if I change the language to Spanish, then the date locale allows me to use the datepicker. Screenshot%20from%202019-11-12%2015-47-58

Screenshot%20from%202019-11-12%2015-48-17

How does the date get displayed after closing the date picker, when you switch to Spanish?

In English (United Kingdom):

Screenshot%20from%202019-11-13%2014-18-10

In Spanish:

Screenshot%20from%202019-11-13%2014-18-47