end_before

On this page

Description:

This key defines the date and time, exclusive, that CloudCannon will allow in an Input.

When configured, CloudCannon will prevent you from selecting a later date and time.

If the Input already contains a later date and time, CloudCannon will require you to change it to a valid value to save your changes, or discard your unsaved changes.

Value must be in ISO8601 format.

The value can have quotation marks or no quotation marks.

If options.start_from is also configured, this key cannot be an earlier date and time.

This key has no default.

This key is available for Date and Time Inputs.

Appears in:
└── _inputs
    └── *
        └── Date/Datetime Input
            └── options
                └── end_before
Types:

This key defines the date and time, exclusive, that CloudCannon will allow in an Input.

When configured, CloudCannon will prevent you from selecting a later date and time.

If the Input already contains a later date and time, CloudCannon will require you to change it to a valid value to save your changes, or discard your unsaved changes.

Value must be in ISO8601 format.

If options.start_from is also configured, this key cannot be an earlier date and time.

This key has no default.

This key is available for Date and Time Inputs.

Appears in: options.end_before.

This key defines the date and time, exclusive, that CloudCannon will allow in an Input.

When configured, CloudCannon will prevent you from selecting a later date and time.

If the Input already contains a later date and time, CloudCannon will require you to change it to a valid value to save your changes, or discard your unsaved changes.

Value must be in ISO8601 format.

If options.start_from is also configured, this key cannot be an earlier date and time.

This key has no default.

This key is available for Date and Time Inputs.

Appears in: options.end_before.

Examples:

In this example, we want our team to enter the date and time of an event in the 2022_event Input. This Input will only allow dates before January 1st, 2023.

Copied to clipboard
_inputs:
  2022_event:
    type: datetime
    options:
      start_from: 2022-01-01T00:00:00.000Z
      end_before: 2023-01-01T00:00:00.000Z
{
  "_inputs": {
    "2022_event": {
      "type": "datetime",
      "options": {
        "start_from": "2022-01-01T00:00:00.000Z",
        "end_before": "2023-01-01T00:00:00.000Z"
      }
    }
  }
}
Open in a new tab