From fec93eed3a8e48e3c4f730e721cbe9a2eda75a3a Mon Sep 17 00:00:00 2001 From: shagi Date: Wed, 6 Jul 2022 08:14:42 +0200 Subject: [PATCH] Limit split_datetime_field time widget to minutes --- gas/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gas/forms.py b/gas/forms.py index eb2e54c..d509c27 100644 --- a/gas/forms.py +++ b/gas/forms.py @@ -70,10 +70,10 @@ def split_datetime_field(form, field_name): localize=old_field.localize, disabled=old_field.disabled, input_date_formats=("%Y-%m-%d",), - input_time_formats=("%H:%M", "%H:%M:%S"), + input_time_formats=("%H:%M", "%H:%M"), widget=forms.SplitDateTimeWidget( date_format='%Y-%m-%d', - time_format='%H:%M:%S', + time_format='%H:%M', time_attrs={'placeholder': '00:00'}, ), )