From cef797c333e2650bfddeaa92d10cf319f6685dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 16 Jan 2023 23:23:26 +0100 Subject: [PATCH] Revert "Add date and time pickers to forms" This reverts commit 4d91a7651353a9a25c4896ec40a92f79cd0199dc. --- CHANGELOG.md | 1 - src/web/tracker/forms.py | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a8f884..9a0ccb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ * New * When adding session, pre-select game with the last session - * Date and time input fields now have proper pickers ## 0.2.4 / 2023-01-16 19:39+01:00 diff --git a/src/web/tracker/forms.py b/src/web/tracker/forms.py index 2cda2b9..7cfda40 100644 --- a/src/web/tracker/forms.py +++ b/src/web/tracker/forms.py @@ -13,26 +13,12 @@ class SessionForm(forms.ModelForm): "duration_manual", "note", ] - custom_datetime_widget = forms.SplitDateTimeWidget( - date_attrs={"type": "date"}, time_attrs={"type": "time"} - ) - widgets = { - "timestamp_start": custom_datetime_widget, - "timestamp_end": custom_datetime_widget, - } class PurchaseForm(forms.ModelForm): class Meta: model = Purchase fields = ["game", "platform", "date_purchased", "date_refunded"] - custom_date_widget = forms.DateInput( - format=("%d-%m-%Y"), attrs={"type": "date"} - ) - widgets = { - "date_purchased": custom_date_widget, - "date_refunded": custom_date_widget, - } class GameForm(forms.ModelForm):