Skip to content

Commit

Permalink
Use DateTimeField.format correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Jan 19, 2022
1 parent 2330fad commit 70d9de9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sipa/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def __call__(self, *args, **kwargs):
assert isinstance(self.format, list)
format = self.format[0]
if self.min is not None:
kwargs['min'] = self.min.strftime(self.format)
kwargs['min'] = self.min.strftime(format)
if self.max is not None:
kwargs['max'] = self.max.strftime(self.format)
kwargs['max'] = self.max.strftime(format)
return super().__call__(*args, **kwargs)


Expand Down

0 comments on commit 70d9de9

Please sign in to comment.