Skip to content

Add possible values for widget_type #4892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ for more details.
date_widget
~~~~~~~~~~~

**type**: ``string`` **default**: ``choice``

Defines the ``widget`` option for the :doc:`date </reference/forms/types/date>` type
.. include:: /reference/forms/types/options/date_widget_description.rst.inc

.. include:: /reference/forms/types/options/days.rst.inc

Expand Down
12 changes: 1 addition & 11 deletions reference/forms/types/options/date_widget.rst.inc
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
widget
~~~~~~

**type**: ``string`` **default**: ``choice``

The basic way in which this field should be rendered. Can be one of the following:

* ``choice``: renders three select inputs. The order of the selects is defined
in the `format`_ option.

* ``text``: renders a three field input of type ``text`` (month, day, year).

* ``single_text``: renders a single input of type ``date``. User's input is
validated based on the `format`_ option.
.. include:: /reference/forms/types/options/date_widget_description.rst.inc
11 changes: 11 additions & 0 deletions reference/forms/types/options/date_widget_description.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**type**: ``string`` **default**: ``choice``

The basic way in which this field should be rendered. Can be one of the following:

* ``choice``: renders three select inputs. The order of the selects is defined
in the `format`_ option.

* ``text``: renders a three field input of type ``text`` (month, day, year).

* ``single_text``: renders a single input of type ``date``. User's input is
validated based on the `format`_ option.