Calendar/Appointments in 24 hour format

daviskrex wrote on Sunday, September 01, 2013:

Hello,

I was wondering if there is something I can do to make the calendar, appointment creation in 24 hour format?
After several hours of poking around the code, it seems that the calendar supports 24 hour format, but somewhere between it fails.
It seems that the demo pages has this problem too.

Can anyone help me solving this problem?

Thanks,
Dāvis.

jcahn2 wrote on Sunday, September 01, 2013:

Try Administration -> Globals -> Locale near the bottom of the list. Should affect all times - not just the calendar if that is what you desire.

fsgl wrote on Sunday, September 01, 2013:

I think the first attachment represents the Dynarch Calendar, which is already in the 24 hour format.

Changing Globals/Locale did not do anything.

The second attachment shows the tables for the PostNuke Calendar (the other small calendar). Changing the value from 0 to 1 did nothing.

The third attachment is for the Php Calendar (? the large Appointment Calendar). It has some intriguing clues, but where to apply the change?

Right church, wrong pew perhaps.

O.K., we give up. Do tell us.

daviskrex wrote on Monday, September 02, 2013:

Ok, I know, I suck at explaining things.
The places I couldn’t get working were these ( attachments )

one is the calendar which shows the appointments, the other is add_new_event form.

Thanks,
Dāvis.

fsgl wrote on Monday, September 02, 2013:

I was directing the “O.K., we give up. Do tell us” remark to the developers, because after a long search I only came up with the codes about the Adodb Calendar, which may or may not be the Appointment Calendar.

One of the developers will have to tell us where to change timeFormat because it is not obvious. It’s like looking a needle in a haystack.

fsgl wrote on Monday, September 02, 2013:

May have found the codes for the Add Event Dialog.

Openemr\interface\main\calendar\add_edit_event.php lines 792 and 794, change 12 to 24?

Did not test it yet, hence the question mark.

daviskrex wrote on Saturday, September 07, 2013:

Thanks!
That really worked :slight_smile:

I had to comment out two lines for javascript validation on the same file, it is working now.

As for the the time table in attachments, I finally figured it out!
I needed to change “interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html” on line 374.

fsgl wrote on Saturday, September 07, 2013:

Great! What a lucky guess on my part.

So the Appointment Calendar was hiding in the PostCalendar folder after all. I was thrown off thinking that it referred to the PostNuke Calendar.