From 7dc826b9758d634623a6f5ca05d0ca2048a0ce48 Mon Sep 17 00:00:00 2001 From: Samriddha9619 Date: Wed, 24 Sep 2025 23:32:06 +0530 Subject: [PATCH 1/3] Fixed #33113 -- Documented usage and caveats of HTML5 date input in DateInput widget. --- docs/ref/forms/widgets.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 80047aabc5e9..c65063cd68a4 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -646,6 +646,29 @@ These widgets make use of the HTML elements ``input`` and ``textarea``. :doc:`/topics/i18n/formatting`. ``%U``, ``%W``, and ``%j`` formats are not supported by this widget. + .. admonition:: Using the HTML5 "date" input type + + If you are targeting browsers that support the + `HTML5 "date" input type`_, you can override the ``input_type`` + attribute to enable the browser’s native date picker:: + + class MyDateInput(forms.DateInput): + input_type = "date" + format = "%Y-%m-%d" + + Alternatively:: + + DateInput(attrs={"type": "date"}, format="%Y-%m-%d") + + HTML5 date inputs expect values in the ISO format ``YYYY-MM-DD``. If a + different format is provided, the field may appear empty even when a + value exists. Setting the ``format`` attribute controls how Django + provides the value, but the browser controls how it is displayed. + Hence, the ``format`` attribute and the :setting:`DATE_INPUT_FORMATS` + setting will have no effect on the displayed value. + + .. _HTML5 "date" input type: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date + ``DateTimeInput`` ~~~~~~~~~~~~~~~~~ From 746f5fd23e50589ef3ad27b1dad46b569f600fa0 Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:16:21 +0200 Subject: [PATCH 2/3] Clarified "Add another question" as the plus sign button. --- docs/intro/tutorial07.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/intro/tutorial07.txt b/docs/intro/tutorial07.txt index ab77f2b5400e..3e963d32804e 100644 --- a/docs/intro/tutorial07.txt +++ b/docs/intro/tutorial07.txt @@ -109,12 +109,12 @@ the database. Django knows that a :class:`~django.db.models.ForeignKey` should be represented in the admin as a ``