DateRangeField
This class provides a specialized form field for inputting a range of dates. It utilizes a base date field and maps the input data to a date range object, ensuring that both the start and end values are valid dates.
Attributes
| Attribute | Type | Description |
|---|---|---|
| default_error_messages | dict = {"invalid": _("Enter two valid dates.")} | A dictionary containing the error message displayed when the input does not consist of two valid dates. |
| base_field | [Field](../../../../forms/fields/field.md?sid=django_forms_fields_field) = forms.DateField | The form field class used to validate each individual endpoint of the date range. |
| range_type | class = DateRange | The underlying Python object type used to represent the continuous range of dates. |
Constructor
Signature
def DateRangeField() - > null
Signature
def DateRangeField() - > null