DateTimeRangeField
This class provides a form field for inputting a range of date and time values, including time zone information. It utilizes a base field of DateTimeField and validates that the input consists of two valid date/time entries. The class maps the resulting data to a DateTimeTZRange object for handling temporal intervals.
Attributes
| Attribute | Type | Description |
|---|---|---|
| default_error_messages | dict = {"invalid": _("Enter two valid date/times.")} | A dictionary containing the error message displayed when the input does not consist of two valid date/times. |
| base_field | [Field](../../../../forms/fields/field.md?sid=django_forms_fields_field) = forms.DateTimeField | The form field class used to validate and render the individual start and end components of the date-time range. |
| range_type | type = DateTimeTZRange | The underlying Python data type used to represent the continuous range of date-time objects. |
Constructor
Signature
def DateTimeRangeField() - > null
Signature
def DateTimeRangeField() - > null