gpb_auto_select_single_date

  1. Description
  2. Usage Patterns
  3. Parameters

Description

Enable auto-selection of single available dates.

By default, auto-selection is disabled.

Usage Patterns

Enable auto-selection for all services


window.gform.addFilter('gpb_auto_select_single_date', function(autoSelectEnabled, context) {
    return true;
});

Enable auto-selection for a specific service


window.gform.addFilter('gpb_auto_select_single_date', function(autoSelectEnabled, context) {
    if (context.service?.id === 123) {
        return true;
    }
    return autoSelectEnabled;
});

Parameters

  • autoSelectEnabled boolean – Whether auto-selection is enabled. Default is false.

  • context Object – Context object containing service and field information.

  • context.service Object – The current service object.

Since

  • 1.0-beta-1.5 Hook added.