Do not start calendar (eventCalendar) with upcoming events

Asked

Viewed 36 times

0

I would like to start the calendar by showing the events of the current month and not the upcoming events.

<link href="admin/coisasDoSite/calendario/EventCalendar/css/eventCalendar.css" rel="stylesheet"  type="text/css"/>
<link href="admin/coisasDoSite/calendario/EventCalendar/css/eventCalendar_theme_responsive.css" rel="stylesheet"  type="text/css"/>


<script src="admin/coisasDoSite/calendario/jquery/jquery_1.9.1_jquery.min.js" type="text/javascript"></script>
<script src="admin/coisasDoSite/calendario/EventCalendar/js/moment.js" type="text/javascript"></script>
 <script src="admin/coisasDoSite/calendario/EventCalendar/js/jquery.eventCalendar.min.js" type="text/javascript"></script>

<div id="calendario"></div>
<script>
   window.onload = function()
{
    document.getElementsByClassName("eventCalendar-monthTitle").click();
}
    $(function () {
        $('#calendario').eventCalendar({
            eventsjson: 'calendario.php',
            jsonDateFormat: 'human',
            dateFormat: 'dddd D/MM/YYYY',
            eventsLimit: 12,
            locales: {
                locale: "pt",
                monthNames: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julio", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
                dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabado'],
                dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                txt_noEvents: "Não há eventos para este periodo",
                txt_SpecificEvents_prev: "",
                txt_SpecificEvents_after: "eventos:",
                txt_next: "siguiente",
                txt_prev: "anterior",
                txt_NextEvents: "Próximos Eventos:",
                txt_GoToEventUrl: "Ver",
                "moment": {
                    "months": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julio", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
                    "weekdays": ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sabado'],
                    "weekdaysShort": ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                    "weekdaysMin": ["Do", "SE", "TE", "QU", "QUI", "SE", "SA"]
                }
            }
        });
    });
</script>

"Documentation" of the library

  • I believe that if there is any event scheduled in the current month should start the calendar this month. Your calendar still has some event to be held this month?

  • it starts in the month but picks up every month forward

  • On the demo page I did not see what you are saying. Can you show the link of your page? But it would be better to post the code in the question

  • http://associacaoeua.com.br/

  • So the philosophy is to show upcoming events. If there were events in the month they would be shown. If there are only events in December they will be shown.

  • Correct. I would like to start only with the current month

  • Have you ever tried to put Eventslimit: 0 if there are no events in the month? If it results the concern is at the turn of the month set this again

  • This page is in PHP?

  • this page is php.

  • I will have to leave now, soon I will install this in a php page and do some tests on my server.

  • No installation tutorial gets complicated! I don’t understand how to include or remove events. Anyway I think q you want is impossible.

Show 6 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.