Page 1 of 1
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
Posted: Fri Feb 09, 2018 4:17 pm
by paulbaker
Assuming you're talking about the main default calendar layout (the one month grid) then no I haven't worked that out. It uses
https://fullcalendar.io/ so it should be possible given a bit of investigation.
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
Posted: Sat Feb 10, 2018 4:23 pm
by paulbaker
Try putting // before the last .replace - it is that line which strips the "m" bit.
// makes it a comment rather than an instruction.
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
Posted: Tue Feb 13, 2018 8:47 am
by velden
Last time I used the CGCalendar module no changes needed to be made in js files.
fullcalendar.io allows to set all options via javascript options. It should be possible to set those inside the template.
fullcalendar.io uses the formating from moments.js (
http://momentjs.com/docs/#/displaying/format/) and added the t/T formats (
https://fullcalendar.io/docs/utilities/ ... ng_string/)
Now, inside the template you need to find out where to put the options for your view.
https://fullcalendar.io/docs/text/timeFormat/
(Try changing the 't' to an 'a' for am/pm)
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
Posted: Tue Feb 13, 2018 11:51 am
by velden
There are no references so it's using defaults. The fullcalendar.io documentation is giving examples. I don't have the module installed so can't test.
Did you try? E.g.:
Code: Select all
....
dayNamesShort: dateStrings.dayNamesShort,
timeFormat: 'h:mm a',
firstDay: {$firstdayofweek},
....