From 0034e9af18f3d393a6dd2389ffbba4c919b1d7d7 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 13 Jan 2017 12:48:30 +0100 Subject: Fixed #5851 -- Allowed specifying different HTML attrs for SplitDateTimeWidget subwidgets. Thanks Tim Graham and Nick Pope for review. --- docs/ref/forms/widgets.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 9f3ea2840c..e32cefb0da 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -840,7 +840,7 @@ Composite widgets for the date, and :class:`TimeInput` for the time. Must be used with :class:`SplitDateTimeField` rather than :class:`DateTimeField`. - ``SplitDateTimeWidget`` has two optional attributes: + ``SplitDateTimeWidget`` has several optional arguments: .. attribute:: SplitDateTimeWidget.date_format @@ -850,6 +850,16 @@ Composite widgets Similar to :attr:`TimeInput.format` + .. attribute:: SplitDateTimeWidget.date_attrs + .. attribute:: SplitDateTimeWidget.time_attrs + + .. versionadded:: 2.0 + + Similar to :attr:`Widget.attrs`. A dictionary containing HTML + attributes to be set on the rendered :class:`DateInput` and + :class:`TimeInput` widgets, respectively. If these attributes aren't + set, :attr:`Widget.attrs` is used instead. + ``SplitHiddenDateTimeWidget`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3