﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32924	Move special-case logic in BoundField.initial() to BaseForm.get_initial_for_field()	Chris Jerdonek	Chris Jerdonek	"This is another follow-up to ticket #32920.

Currently, `BoundField.initial()` has logic to special-case `time` and `datetime` objects:
https://github.com/django/django/blob/f5669fd7b568cf8a3eda1e65c1c6fb583c7b177d/django/forms/boundfield.py#L217-L219
I noticed that this logic can be moved to `BaseForm.get_initial_for_field()`, and in particular under the `if callable(value)` block:
https://github.com/django/django/blob/f5669fd7b568cf8a3eda1e65c1c6fb583c7b177d/django/forms/forms.py#L496-L497

Eventually, I think it could make sense to go further and move some of this logic to a new method of the `Field` class, which could permit the special-casing to be handled by overriding in sub-classes that use times and datetimes.
"	Cleanup/optimization	closed	Forms	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
