Dynamic Date Selection & Month Display
You can dynamically select a date or set the starting month and year of the calendar using query strings.
Month display
You can set the start month or year using the wpbs-start-month
and wpbs-start-year
parameters. Both accept a numeric value, 1-12 for the month, and a 4 digit number for the year.
To automatically load the calendar showing August 2022, your URL would need to look like this:
https://yoursite.com/calendar-page/?wpbs-start-month=8&wpbs-start-year=2022
Date Selection
To dynamically select a date, you need to use the wpbs-selection-start
and wpbs-selection-end
parameters. Both parameters accept a date string, in the Y-m-d format (0000-00-00).
To automatically select 20-27 August 2022 in the calendar, your URL would need to look like this:
https://yoursite.com/calendar-page/?wpbs-selection-start=2022-08-20&wpbs-selection-end=2022-08-27
When using date selection, it also recommended you add the start month and year parameters, otherwise, the selection may not be visible. The full URL would look like this:
https://yoursite.com/calendar-page/?wpbs-start-month=8&wpbs-start-year=2022&wpbs-selection-start=2022-08-20&wpbs-selection-end=2022-08-27