CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
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.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
Try putting // before the last .replace - it is that line which strips the "m" bit.
// makes it a comment rather than an instruction.
// makes it a comment rather than an instruction.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Re: CGCalendar use 'am' and 'pm' instead of 'a' and 'p'
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)
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'
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.:
Did you try? E.g.:
Code: Select all
....
dayNamesShort: dateStrings.dayNamesShort,
timeFormat: 'h:mm a',
firstDay: {$firstdayofweek},
....