mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #5851 -- Allowed specifying different HTML attrs for SplitDateTimeWidget subwidgets.
Thanks Tim Graham and Nick Pope for review.
This commit is contained in:
committed by
Tim Graham
parent
3a148f958d
commit
0034e9af18
@@ -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``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user