diff --git a/AUTHORS b/AUTHORS index 4bb5f4e2253..d508d9584d7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -185,6 +185,7 @@ answer newbie questions, and generally made Django that much better: GomoX Guilherme Mesquita Gondim Mario Gonzalez + David Gouldin pradeep.gowda@gmail.com Collin Grady Simon Greenhill diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 1ec17f49086..d4964b0bc6c 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -725,6 +725,8 @@ class SplitHiddenDateTimeWidget(SplitDateTimeWidget): """ A Widget that splits datetime input into two inputs. """ + is_hidden = True + def __init__(self, attrs=None): widgets = (HiddenInput(attrs=attrs), HiddenInput(attrs=attrs)) super(SplitDateTimeWidget, self).__init__(widgets, attrs) diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py index 627f50a6fe1..5f9f5dec5d2 100644 --- a/tests/regressiontests/forms/forms.py +++ b/tests/regressiontests/forms/forms.py @@ -1846,4 +1846,15 @@ True + +# Checking that the label for SplitDateTimeField is not being displayed ##### + +>>> from django.forms import * +>>> class EventForm(Form): +... happened_at = SplitDateTimeField(widget=widgets.SplitHiddenDateTimeWidget) +... +>>> form = EventForm() +>>> form.as_ul() +u'' + """