Up your dating game with PMG
No, not those kinds of dates!
When PMGers talk dating, 9 times out of 10, it’s not related to date controls on forms. Just kidding!
Today we’d like to dive into a highly useful feature of date controls – being able to set blackout dates on a Date picker form element. This tool can quickly help you identify availability so you can move on to bigger things.
When you use a reservation website (Airbnb, airlines, hotels, etc.) that involves booking dates, it’s really helpful to know which dates are not available. Now, you can configure PMG’s DynaForm Date control to display specific dates as available or unavailable.
All you need to do is provide a list of unavailable dates, and they will render as grayed out as in the example below. The list of dates can come from any data source. For example, they can be pulled from a database via a query (as in our example below), or from an API endpoint accessed via a Data Workflow.
Example – Configuration
Note that the “Query to Disallow Dates” setting must be checked. In this example, we’re querying dates with SQL as our data source. Note that the unavailable dates are returned in YYYYMMDD format.
Example – Result
On the Date control, the dates returning from the query are not selectable for the end user.
Now you’re ready to go, Romeo!