monim67 / django-bootstrap-datepicker-plus

Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
https://pypi.python.org/pypi/django-bootstrap-datepicker-plus
MIT License
223 stars 61 forks source link

Widget is initialised with wrong date string for European locals #85

Closed christianwgd closed 1 year ago

christianwgd commented 1 year ago

Describe the bug I'm trying to edit a date or datetime object. If this has a value of "23.11.2022 19:52" (db value "2022-11-23 19:52") it is displayed in the form as "20.11.0023 19:52". This is a problem for European locals ("de", "fr", "es", "it", ...), but not for "en-us".

I've created a minimum example to investigate the problem in https://github.com/christianwgd/datepicker

Expected behavior Show the date string in the form as "23.11.2022 19:52"

Screenshots See example app.

Setup Information (please complete the following information):

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

laurentiurosu-04 commented 1 year ago

Hi, I'm having the same issue with timezone 'Europe/Bucharest' on edit.

Screenshot

monim67 commented 1 year ago

Thanks for your reproducible example and screenshot, it helped resolve it swiftly. The fix is released with version 5.0.1.

christianwgd commented 1 year ago

Thanks for the fast fix