members/views: fix prefilling of date inputs

pull/73/head
Christian Merten 1 year ago
parent 02db0669cd
commit bb91d77cfc
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -29,7 +29,7 @@ class MemberRegistrationForm(ModelForm):
'phone_number', 'birth_date', 'gender', 'email', 'alternative_email', 'phone_number', 'birth_date', 'gender', 'email', 'alternative_email',
'registration_form'] 'registration_form']
widgets = { widgets = {
'birth_date': DateInput(format='%d.%m.%Y', attrs={'type': 'date'}), 'birth_date': DateInput(format='%Y-%m-%d', attrs={'type': 'date'}),
'registration_form': FileInput(attrs={'accept': 'application/pdf,image/jpeg,image/png'}), 'registration_form': FileInput(attrs={'accept': 'application/pdf,image/jpeg,image/png'}),
} }
help_texts = { help_texts = {
@ -53,7 +53,7 @@ class MemberRegistrationWaitingListForm(ModelForm):
model = MemberWaitingList model = MemberWaitingList
fields = ['prename', 'lastname', 'birth_date', 'gender', 'email', 'application_text'] fields = ['prename', 'lastname', 'birth_date', 'gender', 'email', 'application_text']
widgets = { widgets = {
'birth_date': DateInput(format='%d.%m.%Y', attrs={'type': 'date'}) 'birth_date': DateInput(format='%Y-%m-%d', attrs={'type': 'date'})
} }
help_texts = { help_texts = {
'prename': _('Prename of the member.'), 'prename': _('Prename of the member.'),

Loading…
Cancel
Save