wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)

Home Page:https://wagtail.github.io/react-streamfield/public/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DateTime format for DateTimeBlock is not loaded correctly

dniegel opened this issue · comments

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().

Same here.

Fixed by b552ee9 and released in 1.0.6 :)