===============
Field Reference
===============

.. module:: django_filters.fields
   :synopsis: Provided form fields and their arguments.

.. currentmodule:: django_filters.fields

.. class:: IsoDateTimeField

Extends :class:`django.forms.DateTimeField` to allow parsing ISO 8601 formated dates, in addition to existing formats

Defines a class level attribute ``ISO_8601`` as constant for the format.

Sets ``input_formats = [ISO_8601]`` — this means that by default ``IsoDateTimeField`` will **only** parse ISO 8601 formated dates.

You may set :attr:`~django.forms.DateTimeField.input_formats` to your list of required formats as per the :class:`~django.forms.DateTimeField` docs, using the ``ISO_8601`` class level attribute to specify the ISO 8601 format.

.. code-block:: python

    f = IsoDateTimeField()
    f.input_formats = [IsoDateTimeField.ISO_8601] + DateTimeField.input_formats

