From 713d6860478d63e0d3d9dff7d331703c3bc1b0ee Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 26 Oct 2021 09:24:44 +0200 Subject: [PATCH] Corrige l'affichage de la date dans le formulaire --- bds/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bds/forms.py b/bds/forms.py index 4f626926..9be0fb5b 100644 --- a/bds/forms.py +++ b/bds/forms.py @@ -36,4 +36,6 @@ class ProfileForm(forms.ModelForm): class Meta: model = BDSProfile exclude = ["user"] - widgets = {"birthdate": forms.DateInput(attrs={"type": "date"})} + widgets = { + "birthdate": forms.DateInput(attrs={"type": "date"}, format="%Y-%m-%d") + }