Page 1 of 2

CGCalendar Date Setting

Posted: Wed Oct 29, 2014 1:06 pm
by KitchM
How does the calendar get the correct date setting?

Thanks.

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 4:24 pm
by Masweb
Go to: Site-admin --> Global Settings and fill the "Date Format String:" filed with a strftime like: %d-%m-%Y

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 5:23 pm
by KitchM
Thank you very much for the advice. I tried as you suggested but my calendar month is still incorrect. It is one month too early. This is October but it displays November.

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 5:28 pm
by Jo Morg
Again: search the forums. It has been asked and answered a few times.

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 5:58 pm
by Masweb
KitchM wrote:Thank you very much for the advice. I tried as you suggested but my calendar month is still incorrect. It is one month too early. This is October but it displays November.
display="upcominglist" displayforday="true"

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 6:29 pm
by KitchM
Thanks for the tip.

Tried it but got no change. I probably put it in the wrong spot in the CSS.

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 6:36 pm
by Masweb
Can you give us a url? Or a piece of your template you are using?

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 7:41 pm
by staartmees
Search The forum. It's a known problem and I somewhere posted a solution. Also Rolf posted a solution.
http://forum.cmsmadesimple.org/viewtopi ... ar#p313618

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 8:14 pm
by paulbaker

Re: CGCalendar Date Setting

Posted: Wed Oct 29, 2014 9:02 pm
by KitchM
I am so embarrased. :-[

Of all the times I've searched a subject, this was the first time I did not. And the answers are all over the place.

Please forgive me.

Someone had already helped me with changing some code in the script months ago. Then it evidently stopped working correctly.

So instead of the part that was added before

Code: Select all

{$month_names[$month]}
I now have

Code: Select all

{$date|date_format:'%B'}
Now it works properly.

Thanks very much for everyone's help. It is appreciated.

Re: CGCalendar Date Setting

Posted: Thu Oct 30, 2014 5:43 am
by staartmees
Please add [Solved] to the titel.

Re: [Solved] CGCalendar Date Setting

Posted: Thu Oct 30, 2014 2:28 pm
by KitchM
With my fingers crossed that it doesn't change again.....

Re: [Solved] CGCalendar Date Setting

Posted: Sat Nov 15, 2014 4:32 pm
by cromoglic
This solution does not work for me. I've got this in my list template:

Code: Select all

<span class="calendar-prev"><a class="button" href="{$navigation.prev}">&laquo;</a></span>&nbsp;<span class="button">{*$month_names[$month]*}{$date|date_format:'%B'}&nbsp;{$year}</span>&nbsp;<span class="calendar-next"><a class="button" href="{$navigation.next}">&raquo;</a></span>
$date|date_format:"%B" shows nothing. Changing date to $month shows nothing. Removing date_format when using $month shows the number of the month, which isn't exactly what I am after.

Anyone? :)

Re: [Solved] CGCalendar Date Setting

Posted: Sun Nov 16, 2014 5:29 pm
by paulbaker
@cromoglic post your system information
http://docs.cmsmadesimple.org/troublesh ... nformation

Re: [Solved] CGCalendar Date Setting

Posted: Sun Nov 23, 2014 10:28 am
by Rolf
cromoglic wrote:$date|date_format:"%B" shows nothing. Changing date to $month shows nothing. Removing date_format when using $month shows the number of the month, which isn't exactly what I am after.
Try:

Code: Select all

{$thedate|date_format:"%B"}