<encounterDate> for past visits is set to today on Firefox


We are using the <encounterDate> HFE tag in a form. When we want to add an encounter to a past visit, the date is automatically set to the visit start date when we load the page:

  • For a visit that starts on 19/08/2015, the date is: => That’s perfect.

However, that doesn’t work on Firefox. On Firefox, the date prefilled is the date of today:

Therefore, I am unable to save the encounter :confused:

Note that it occurs also with Safari iOS and Chrome iOS

Debug of enterHtmlFormWithSimpleUi.page Chrome: Firefox: the setEncounterDate() function is called with the right date (visit start date) in both browsers.

Maybe the problem is coming from the datepicker() function call. This doesn’t set anything when on Firefox.

Hmm, ugh… can you enter this as a ticket and assign it to me and I’ll take a look?

We’ve generally been using Chrome, so certainly could be a bug we missed.

Looks like a date parsing issue… Chrome accepts the format ‘2015-08-19 15:16:20.0’ but Firefox is more strict about only accepting ISO 8601 format. I’ll look into a fix.

I think I’ve this fixed–simple change to use a date with the time component removed. Will do a little more testing tomorrow before committing.

1 Like

Thanks @mogoodrich to look into it. Did you create the ticket already or do you still want me to create it ?

I didn’t create a ticket, but I’ll take care of it…

Ticketed and fixed here:


OK ! Thank you.