Dynamic date selection & month display

Documentation Menu

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

Was this article helpful?

Yes (1) No

We're sorry to see this article wasn't as helpful as we hoped it would be. Please let us know what you were looking for so that we can improve this documentation page.

Full CTA BG
Is WP Booking System a good fit for you?

Tell us about your business activity & plugin requirements and we'll let you know if WP Booking System is right for you.

Have a support question? Please use this form instead.