From 2f042e2dc4e94d09a961bb54b608e48f25a4c5c8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 25 Jun 2024 11:17:25 +0200 Subject: 🐛 Forms: fix date validation not possible when switching to english (refs #5837) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_warehouse/forms.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'archaeological_warehouse') diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 3e5f6f7a8..963042346 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -20,6 +20,7 @@ from collections import OrderedDict import datetime +from bootstrap_datepicker.widgets import DateField from django import forms from django.db.models import Max from django.conf import settings @@ -54,7 +55,6 @@ from . import models from ishtar_common import widgets from archaeological_operations.widgets import OAWidget -from bootstrap_datepicker.widgets import DatePicker from ishtar_common.forms import ( name_validator, @@ -703,9 +703,7 @@ class BasePackagingForm(SelectFindBasketForm): ), validators=[valid_id(Person)], ) - start_date = forms.DateField( - label=_("Date"), required=False, widget=DatePicker, initial=datetime.date.today - ) + start_date = DateField(label=_("Date"), required=False, initial=datetime.date.today) class FindPackagingFormSelection(FindMultipleFormSelection): -- cgit v1.2.3