django-bootstrap-datepicker-plus icon indicating copy to clipboard operation
django-bootstrap-datepicker-plus copied to clipboard

Multilanguage - format not changing

Open goromachine opened this issue 4 years ago • 0 comments

Describe the bug When using two languages that use different formats to validate a date, the widget sticks to the default (o defined) format and do not change with localization.

To Reproduce Steps to reproduce the behavior:

  1. Create a form with the datepicker widget (or datetimepicker widget)
  2. Use Localization and add language "ES" (spanish)
  3. try a date incompatible with both formats like: 01/30/1990
  4. Save form and you'll see the error of format validation.

Expected behavior When setting "ES" as language, the format should change to format='%d/%m/%Y' in front of the default.

Screenshots How it shows the format when EN or ES: image How it should be on ES: image

Setup Information (please complete the following information):

  • Python version [3.6]
  • Django version [2.1]
  • Bootstrap version [4]
  • jQuery version [e.g. 1.7.1]
  • I18N, L10N, TZ = True on settings; tags loaded on template and self.fields['dob'].localize = True self.fields['dob'].widget.is_localized = True

[x] I have followed the configuration instructions and checked out the common error troubleshooting page.

goromachine avatar Oct 19 '20 18:10 goromachine