• Hi,

    I’ve managed to display the calendar as a list, which is what I wanted, by using the shortcode that you’ve provided in this forum. What I can’t understand how to do is displaying a certain week by default. For example May 24-30.

    It would be even greater if I could define the starting day, so it lists events from May 25 onwards. Right now the week always starts on Sunday.

    Suggestion – you have provided so many amazing examples here in the forum. PLEASE add them to your website as well.

    Cheers! (and thanks for a really great plugin)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author michielve

    (@michielve)

    Hi,

    The starting day is one of the properties that is determined by the locale. For example if you use:

    [pgc locale="nl-nl"]

    you will see that now the starting day is Monday. Setting the locale will also translate the calendar text and things like time and date format.

    If you only want to set the starting day to Monday, you can do:

    [pgc first_day="1"]

    Regarding your other question about displaying a certain week bij default: do you mean you want to explicitly set May 24-30 as the period? So if we are in June, than it will still display this period?

    I’m currently working on the documentation of this plugin and I will add examples to it.

    Thread Starter boonika

    (@boonika)

    Thanks. I am using it for the conference that will happen in the future. Instead of entering almost identical data into two separate calendars (for speakers and attendees) I decided to go for Google calendars because I can use it as a reminder for speakers but also as the program schedule for attendees.

    Of course, the problem is that I can’t display that schedule as a list before the event. So it would be cool to have something like [pgc start_date=”2020-05-25″]. Something similar was discussed here: https://stackoverflow.com/questions/43858289/fullcalendar-display-within-date-range (and on some other threads)

    Even if that is supported I don’t really know how to write it as a shortcode and I can’t get it working as a JS either.

    Plugin Author michielve

    (@michielve)

    That’s possible by using FullCalendar’s “validRange” property, but you have to “translate” it to a format that the shortcode understands:

    [pgc valid_range-start="2020-05-25"]

    You can also set an end date with valid_range-end but this isn’t required.

    Thread Starter boonika

    (@boonika)

    Thanks for your assistance. I will test that.

    Thread Starter boonika

    (@boonika)

    OK, that worked perfectly. Thanks once again.

    I have noticed something that I would like to inform you about. If I define the calendar inside Gutenberg as a PGC block or a shortcode, the grid view displays more than one event per day differently than it does when you set it with Elementor. Everything else is almost identical. To be more precise, in the first scenario it will show one event inside the square field/day and add something like “+12 more” if it has 12 events that day. If set inside Elementor it shows the list of all the events for that day right away.

    Additionally, I am trying to understand how to achieve the same result with shortcode and JSON. With your help, I managed to get the shortcode to display the ListView with the specified start date. However, for the Gutenberg block, I can’t get it to work. You might ask why I want to do that in the first place. Well, because of what I wrote at the beginning. When someone wants to check the grid/month view it would be much better for her/him to be able to see all the events for a specific date, without being confused by that +n link, and that only works correctly inside Elementor setup.

    {
      "validRange": {
        "start": "2020-05-25"
      },
      "defaultView": "listWeek",
      "eventDescription": "true",
      "header": {
        "left": "prev,next today",
        "center": "title",
        "right": "dayGridMonth,timeGridWeek,listWeek"
      }
    }

    [pgc public=”true” calendarids=”id1,id2,id3″ default_view=”listWeek” valid_range-start=”2020-05-25″ first_day=”1″ eventpopup=”true” eventdescription=”true”]

    Plugin Author michielve

    (@michielve)

    I don’t know why the events are displayed with Elementor and hidden without. Maybe it does something to the CSS.

    But you can force the events to be displayed always by setting the eventLimit property (or event_limit for shortcode).

    See also https://fullcalendar.io/docs/eventLimit

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show specific week by default’ is closed to new replies.