Limit split_datetime_field time widget to minutes

This commit is contained in:
Ales (Shagi) Zabala Alava 2022-07-06 08:14:42 +02:00
parent 628925a013
commit fec93eed3a
1 changed files with 2 additions and 2 deletions

View File

@ -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'},
),
)