Availability
How to query
You can query availability from your templates using craft.availability
.
While some of the syntax is similar this does not return an Element Query.
Parameters
ticket(Ticket|null)
Check availability for the given ticket of the event.
{% set query = craft.availability(entry.eventField).ticket(entry.variants.one().ticketField) %}
start(DateTime|string|null)
Query availability from the given date. Must either be or be parse-able by DateTime.
end(DateTime|string|null)
Query availability until the given date. Must either be or be parse-able by DateTime.
limit(int|null)
Limit the number of slots by the given amount. Will be ignored if end
is set.
groupBy(string|null)
Group the results by a given frequency.
Allowed Frequencies:
hour
day
week
month
year