From 649a7380123199171dcf511c35bb67726472a663 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 12 Jan 2020 00:58:24 +0100 Subject: Support MonthField, but not HTML5 atm --- app/views/consts.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/consts.py b/app/views/consts.py index 66c8938..5d6598d 100644 --- a/app/views/consts.py +++ b/app/views/consts.py @@ -25,12 +25,10 @@ def one_year(d): # Form # class ConstForm(F.Form): - start = F.DateField('Beginn', F.req, - format='%m.%Y', + start = F.MonthField('Beginn', F.req, default=lambda: today()) - end = F.DateField('Ende', F.req, - format='%m.%Y', + end = F.MonthField('Ende', F.req, default=lambda: one_year(today()), description='(einschließlich)') -- cgit v1.2.3-70-g09d2