wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)
https://wagtail.github.io/react-streamfield/public/
BSD 3-Clause "New" or "Revised" License
74 stars 23 forks source link

DateTime format for DateTimeBlock is not loaded correctly #25

Closed dniegel closed 5 years ago

dniegel commented 5 years ago

Hi,

it seems there is a bug for DateTimeBlock (from wagtail.core.blocks), when a page containing it is edited or after the first save, saving again is resulting in a validation error:

datetime_format_bug

Version: 1.0.5

Steps to reproduce:

1) Create a page with a stream field with a DateTimeBlock option

2) Choose any valid DateTime and save

3) The DateTime format should be incorrect now / trying to save again should produce a validation error.

The reason for this behaviour might be the usage of the InputJSONEncoder / DjangoJSONEncoder (in function render_with_errors) which uses isoformat().

ChristophTr commented 5 years ago

Same here.

BertrandBordage commented 5 years ago

Fixed by b552ee9d0a966f9a81bb0fdbaeec8a830996c766 and released in 1.0.6 :)