How do I get the calendar to open to a specific month or date?

The Opportunity Calendar at /calendar automatically opens to the current month.  But what if you want to create a navigational link to a calendar that opens on a future month?  Or in week view?  Or in day view and to a specific day?  

It can be done by appending some parameters to the calendar URL.  Here's how:

Examples:  

  • The URL      /calendar?year=2017&month=12                   will open the calendar to December, 2017
  • The URL     /calendar?year=2019&month=03&day=29      will open the calendar  to March 29, 2019

If you only specify the year, the calendar will be open on the month of January for that year.

The month parameter must be 2 digits, (January is 01):  If you only specify the month, the calendar will open in the date: current year-month-01

Day must be 2 digits  (the 1st is 01): If you only specify the day, the calendar will open in day view for the current year - current month

You can use these URLs as hyperlinks, or create menu items that open to specific days or months.

What about week view or day view?

If you specify week=true in the url, calendar will display the week which belong the requested day.

i.e.:

To open week Apr 1 — 7 2018, the url is:

/calendar?year=2018&month=04&day=01&week=true

(This week can be displayed by other url like /calendar?year=2018&month=04&day=02&week=true because that day belongs to that week, too.)

Other considerations:

  • If it's not specified year, month and day, but week is true (/calendar?week=true) it will display the current week.
  • If it's not specified month and day, but week is true (/calendar?year=2018&week=true) it will display the first week of the requested year.
  • If it's not specified day, but week is true (/calendar?year=2018&month=03&week=true) it will display the first week of the requested month.

The parameter &Day=True will open the calendar in day view.

How can I present a filtered view of the calendar for a future date?

Filter the calendar as desired, search, and then click on the "Get Shareable Link" button.  Then copy the Search Result Link that you get.  

Now, append to this saved search URL, the parameters to get to a specific date.  However, since the first parameter is the saved ID, start the date parameters with a "&" instead of a "?"

Example:   I want this filtered search to open in December 2018, so I use this shareable URL I get from the filters above:

https://www.handsonrva.org/calendar/share/08bec8927aa148e3b491fca8af2444dc

and then, if I want it to open in December, 2018 I append this to it:

&year=2018&month=12

The resulting URL would be:

https://www.handsonrva.org/calendar/share/08bec8927aa148e3b491fca8af2444dc&year=2018&month=12

If I wanted to open this filtered version of the calendar in week view during the week when Oct 31, 2019 is present, I would use this URL.

https://www.handsonrva.org/calendar/share/08bec8927aa148e3b491fca8af2444dc&year=2019&month=10&day=31&week=true

 

0 Comments

Add your comment

E-Mail me when someone replies to this comment