Added widget to select the date

This commit is contained in:
JKuijperM 2026-02-06 22:33:45 +01:00
parent ae46c7993d
commit b2309a2fee

View File

@ -45,6 +45,9 @@ class IncomeForm(forms.ModelForm):
class Meta:
model = Income
fields = ['account', 'name', 'amount', 'date']
widgets = {
'date': forms.DateInput(attrs={'type': 'date'})
}
def __init__(self, *args, **kwargs):
user = kwargs.pop('user')