=== django/contrib/admin/options.py
==================================================================
|
|
|
150 | 150 | |
151 | 151 | # For DateTimeFields, use a special field and widget. |
152 | 152 | if isinstance(db_field, models.DateTimeField): |
153 | | return forms.SplitDateTimeField(required=not db_field.blank, |
154 | | widget=widgets.AdminSplitDateTime(), label=capfirst(db_field.verbose_name), |
155 | | help_text=db_field.help_text, **kwargs) |
| 153 | kwargs['form_class'] = forms.SplitDateTimeField |
| 154 | kwargs['widget'] = widgets.AdminSplitDateTime() |
| 155 | return db_field.formfield(**kwargs) |
156 | 156 | |
157 | 157 | # For DateFields, add a custom CSS class. |
158 | 158 | if isinstance(db_field, models.DateField): |