Skip to content

Commit 18d28e8

Browse files
authored
Merge pull request #2190 from caumons/datetimefield-wtforms3
Fixed DateTimeField format compatibility with WTForms 3.0. Fixes #2189
2 parents 7cff9c7 + 5041018 commit 18d28e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

flask_admin/form/fields.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ def __init__(self, label=None, validators=None, format=None, **kwargs):
3636
:param kwargs:
3737
Any additional parameters
3838
"""
39-
super(DateTimeField, self).__init__(label, validators, **kwargs)
40-
41-
self.format = format or '%Y-%m-%d %H:%M:%S'
39+
super(DateTimeField, self).__init__(
40+
label, validators, format or '%Y-%m-%d %H:%M:%S', **kwargs)
4241

4342

4443
class TimeField(fields.Field):

0 commit comments

Comments
 (0)