Set Booking Calendar View To Specific Month Via Script
This snippet sets the JetBooking calendar to a specific month, listens for filter events, and updates a user meta field via AJAX after a booking. It integrates JetBooking, JetSmartFilters, and JetEngine to coordinate these actions in a single custom script.
Specifications
Set Booking Calendar View To Specific Month Via Script
7 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the provided JavaScript code snippet to your clipboard.
- Add the code using one of the following methods:
-
Option A: Using a Custom Code Plugin (Recommended)
- Install and activate a plugin such as WPCode Lite, Code Snippets, or Simple Custom CSS and JS.
- Create a new JavaScript snippet.
- Paste only the JavaScript code, without <script> tags.
- Save and activate the snippet.
-
Option B: Using a Custom Code / HTML Area
- Add the code in a Custom HTML widget or directly into a theme file (for example, header.php or footer.php).
- Keep the <script> tags when using this method.
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to preset and dynamically manage calendar views and filters in JetBooking-based platforms for improved UX. Booking site admins and developers wanting custom calendar behavior will benefit.
Applicable scenarios:
- Travel and rental booking sites showing default popular booking months.
- Event booking platforms syncing filters with the calendar view dynamically.
- Membership or user-driven booking platforms tracking preferences per user.
- Vacation rental sites optimizing the guest booking experience.
- Booking managers automating personalized calendar views.
Specifications
Set Booking Calendar View To Specific Month Via Script
7 January, 2026
-
Plugin
-
Category
-
Programming languages