1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-22 01:18:27 +02:00

Remove bootstrap-datepicker-plus dependency, use native HTML selectors

This commit is contained in:
Emmy D'Anello
2023-02-19 19:18:25 +01:00
parent e17273391d
commit 2faade0156
5 changed files with 18 additions and 21 deletions

View File

@ -99,6 +99,10 @@ class StudentRegistrationForm(forms.ModelForm):
"""
A student can update its class, its school and if it allows Animath to contact him/her later.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields["birth_date"].widget = forms.DateInput(attrs={'type': 'date'}, format='%Y-%m-%d')
class Meta:
model = StudentRegistration
fields = ('team', 'student_class', 'birth_date', 'gender', 'address', 'zip_code', 'city', 'phone_number',